:root {
  --navy:#0b2f4b;
  --navy-2:#123f63;
  --navy-3:#1b557f;
  --gold:#d5aa3a;
  --gold-soft:#fbf4df;
  --page:#f4f6f8;
  --card:#fff;
  --text:#0a1c2e;
  --muted:#66778a;
  --line:#dbe4ec;
  --green:#21975b;
  --green-soft:#eaf8f0;
  --red:#b53b3b;
  --red-soft:#fff0f0;
  --blue-soft:#edf6ff;
  --shadow:0 14px 40px rgba(11,47,75,.10);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--page);color:var(--text)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

.app-shell{min-height:100vh;display:grid;grid-template-columns:240px minmax(0,1fr)}
.sidebar{background:var(--navy);color:white;padding:24px 18px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:flex-start;gap:12px;padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.14)}
.brand-mark{display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(215,166,42,.5);border-radius:12px;color:var(--gold);font-weight:800}
.brand strong{display:block;color:var(--gold);font-size:21px;letter-spacing:.08em}
.brand span{display:block;margin-top:3px;font-size:11px;letter-spacing:.08em;color:#bdd0e0}
.nav{display:grid;gap:7px;margin-top:22px}
.nav button{border:0;background:transparent;color:#d5e2ed;text-align:left;padding:12px 13px;border-radius:10px;font-weight:700}
.nav button.active,.nav button:hover{background:rgba(255,255,255,.1);color:#fff}
.sidebar-footer{position:absolute;left:18px;right:18px;bottom:20px;color:#96aec2;font-size:12px}

.main{min-width:0;padding:26px 30px 60px}
.page-heading,.profile-top,.metrics-row,.profile-toolbar,.relationship-objective,.card-heading,.section-heading,.nba-actions,.modal-head,.modal-actions,.investment-row,.info-popover-head,.toolbar-row,.list-row,.meeting-row,.report-row{display:flex;align-items:center;justify-content:space-between}
.page-heading h1{margin:0;font-size:29px}
.page-heading p{margin:6px 0 0;color:var(--muted)}
.page-actions{display:flex;gap:10px}
.version-badge,.priority-pill,.status-chip,.pill{display:inline-flex;align-items:center;gap:6px;background:var(--gold-soft);color:#825f00;border:1px solid #ebcf86;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.pill.green{background:var(--green-soft);color:#12683b;border-color:#bfe8d0}
.pill.gray{background:#f2f5f8;color:#596b7b;border-color:#dde5ec}
.pill.red{background:var(--red-soft);color:#8d2a2a;border-color:#f0c3c3}

.primary-button{border:0;background:var(--navy-2);color:#fff;padding:11px 16px;border-radius:9px;font-weight:800}
.primary-button:hover{filter:brightness(1.08)}
.secondary-button{border:1px solid var(--line);background:white;color:var(--text);padding:10px 15px;border-radius:9px;font-weight:700}
.icon-button{border:1px solid var(--line);background:white;color:var(--text);width:38px;height:38px;border-radius:9px;font-size:21px}

.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 8px 24px rgba(9,28,47,.04)}
.card h3{margin:0 0 16px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.metric-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.metric-card span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;font-weight:800}
.metric-card strong{display:block;margin-top:7px;font-size:28px}
.metric-card small{display:block;margin-top:5px;color:var(--muted)}

.dashboard-list{display:grid;gap:12px}
.priority-card{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}
.priority-rank{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--gold-soft);color:#825f00;font-weight:800}
.priority-card h4{margin:0}
.priority-card p{margin:5px 0 0;color:var(--muted);font-size:14px}
.dashboard-split{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr);gap:18px;margin-top:18px}

.directory-toolbar{display:flex;gap:12px;align-items:center;margin:18px 0}
.directory-toolbar input{flex:1}
select,input,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#fff;color:var(--text)}
textarea{min-height:120px;resize:vertical}
.realtor-table{width:100%;border-collapse:collapse}
.realtor-table th,.realtor-table td{padding:13px 10px;border-bottom:1px solid var(--line);text-align:left}
.realtor-table th{font-size:12px;text-transform:uppercase;color:var(--muted)}
.realtor-link{border:0;background:transparent;padding:0;color:var(--navy-2);font-weight:800;text-decoration:underline;text-underline-offset:3px}

.profile-hero{margin-top:18px;background:linear-gradient(135deg,var(--navy-2),var(--navy-3));color:white;padding:24px;border-radius:18px;box-shadow:var(--shadow)}
.profile-top h2{margin:0;font-size:30px}
.profile-top p{margin:5px 0 10px;color:#d5e1eb}
.partner-badge{display:inline-flex;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);padding:6px 10px;border-radius:999px;font-size:12px}
.contact-row{display:flex;flex-wrap:wrap;gap:22px;margin-top:18px;color:#e1ebf3;font-size:14px}
.metrics-row{gap:14px;margin-top:22px}
.progress-ring{width:94px;height:94px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) 0 64%,#35536e 64% 100%)}
.progress-ring-inner{width:68px;height:68px;border-radius:50%;background:var(--navy-2);display:grid;place-items:center;font-size:23px;font-weight:800}
.metric-box{flex:1;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.08);padding:16px;border-radius:12px}
.metric-box span{display:block;font-size:12px;color:#c9d8e5}
.metric-box strong{display:block;margin-top:4px;font-size:23px}
.status-track{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:18px}
.status-step{padding:9px 6px;text-align:center;background:rgba(255,255,255,.88);color:#677a8b;border-radius:8px;font-size:12px}
.status-step.current{background:#ffe7a1;color:#785500;font-weight:800}
.profile-toolbar{margin:13px 0;gap:12px}
.profile-toolbar label{display:grid;gap:5px;min-width:310px;font-size:11px;font-weight:800;text-transform:uppercase}
.relationship-objective{background:#fffaf0;border:1px solid #efd28a;border-radius:14px;padding:17px 18px;gap:18px}
.relationship-objective .label{display:block;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}
.relationship-objective strong{display:block;font-size:19px;margin-top:4px}
.relationship-objective p{margin:4px 0 0;color:var(--muted)}

.subnav{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}
.subnav button{border:1px solid var(--line);background:#fff;color:var(--text);padding:10px 15px;border-radius:9px;font-weight:700}
.subnav button.active{border-color:var(--gold);color:#835f00;background:#fffaf0}
.profile-panel{display:none}
.profile-panel.active{display:block}
.workspace-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(320px,.95fr);gap:18px;align-items:start}
.right-column{display:grid;gap:18px}
.next-best-action{background:#fffaf0;border-left:5px solid var(--gold)}
.next-best-action p{line-height:1.55}
.checklist-section+.checklist-section{margin-top:26px}
.section-progress,.investment-bar{height:8px;background:#e7edf2;border-radius:999px;overflow:hidden}
.section-progress{margin:9px 0 2px}
.section-progress div,.investment-bar div{height:100%;background:var(--green)}
.checklist-grid,.growth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}
.checklist-item,.growth-item{display:flex;align-items:flex-start;gap:10px;padding:13px 0;border-bottom:1px dashed #d6e0e8}
.checklist-item input,.growth-item input{width:auto;margin-top:3px}
.checklist-item span,.growth-item span{flex:1;min-width:0}
.checklist-item strong,.growth-item strong{display:block;font-size:14px}
.checklist-item small,.growth-item small{display:block;color:var(--muted);margin-top:3px}
.counter{display:inline-flex;min-width:25px;justify-content:center;background:#eef3f7;color:#5c6e7f;border-radius:999px;padding:3px 7px;font-size:11px;font-weight:800}
.info-button{border:1px solid var(--line);background:#fff;color:var(--muted);width:25px;height:25px;border-radius:50%;font-weight:800}
.investment-row{margin-top:13px}
.investment-bar{margin-top:6px}
.coaching-note{color:var(--muted);line-height:1.45;font-size:13px;margin-top:18px}
.frog-list{margin:0}
.frog-list div{padding:10px 0;border-bottom:1px solid var(--line)}
.frog-list dt{font-weight:800}
.frog-list dd{margin:3px 0 0;color:var(--muted)}
.timeline-list{display:grid}
.timeline-list article{display:grid;grid-template-columns:110px 1fr;gap:15px;padding:14px 0;border-bottom:1px solid var(--line)}
.timeline-list p{margin:3px 0 0;color:var(--muted)}
.notes-list{display:grid;gap:10px;margin-top:16px}
.note-item{border:1px solid var(--line);border-radius:12px;padding:13px;background:#fbfdff}

.activity-list,.meeting-list,.notification-list,.report-list{display:grid;gap:10px}
.list-row,.meeting-row,.report-row{gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.list-row>div,.meeting-row>div,.report-row>div{min-width:0}
.list-row h4,.meeting-row h4,.report-row h4{margin:0}
.list-row p,.meeting-row p,.report-row p{margin:4px 0 0;color:var(--muted);font-size:14px}
.notification-item{display:grid;grid-template-columns:1fr auto;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.notification-item p{margin:4px 0 0;color:var(--muted)}
.notification-item button{align-self:start}

.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.settings-card label{display:grid;gap:6px;margin-top:13px}
.form-check{display:flex;align-items:center;gap:9px;margin-top:16px}
.form-check input{width:auto}
.form-check label{margin:0}

.modal-backdrop{position:fixed;inset:0;background:rgba(6,22,38,.55);z-index:80}
.modal{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:20px}
.modal-card{width:min(680px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:0 30px 100px rgba(0,0,0,.24)}
.eyebrow{margin:0 0 4px;font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:800}
.modal-head h2{margin:0}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.modal label{display:grid;gap:6px;margin-top:16px;font-weight:700}
.modal label small{color:var(--muted);font-weight:400}
.modal-actions{justify-content:flex-end;gap:10px;margin-top:18px}

.info-popover{position:fixed;right:24px;bottom:24px;width:min(380px,calc(100vw - 48px));z-index:100;background:var(--navy);color:#fff;border-radius:16px;padding:18px;box-shadow:0 28px 90px rgba(0,0,0,.3)}
.info-popover h3{margin:0}
.info-popover p{color:#dce7ef;line-height:1.55}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--navy);color:#fff;padding:11px 16px;border-radius:999px;z-index:120;transition:.2s ease}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:1080px){
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-split,.workspace-grid{grid-template-columns:1fr}
}
@media(max-width:820px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:static;height:auto}
  .sidebar-footer{display:none}
  .nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .nav button{text-align:center}
  .main{padding:20px 16px 50px}
  .grid-2,.grid-3,.settings-grid,.checklist-grid,.growth-grid,.form-grid,.status-track{grid-template-columns:1fr}
  .metrics-row{flex-wrap:wrap}
  .profile-toolbar,.relationship-objective,.page-heading{align-items:flex-start;flex-direction:column}
  .profile-toolbar label{min-width:0;width:100%}
  .realtor-table{display:block;overflow-x:auto}
}


/* Crown V9 additions */
.relationship-progress-card{margin-top:14px}
.relationship-progress-track{height:12px;background:#e6ebef;border-radius:999px;overflow:hidden;margin-top:14px}
.relationship-progress-fill{height:100%;background:linear-gradient(90deg,var(--gold),#ebc96b);border-radius:999px}
.relationship-progress-labels{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:8px;color:var(--muted);font-size:12px}
.relationship-progress-labels span:nth-child(2){text-align:center}
.relationship-progress-labels span:last-child{text-align:right}
.primary-button{background:var(--gold);color:#17334a}
.nav button.active{border-left:3px solid var(--gold)}


/* Crown V9.1 — Add Realtor */
.realtor-modal-card{width:min(760px,100%)}
.form-error{margin:14px 0 0;padding:10px 12px;border-radius:10px;background:var(--red-soft);color:#8d2a2a;border:1px solid #efc2c2;font-weight:700}
#realtorForm>label{display:grid;gap:6px;margin-top:16px;font-weight:700}
#realtorForm input:focus,#realtorForm select:focus,#realtorForm textarea:focus{outline:3px solid rgba(215,166,42,.22);border-color:var(--gold)}
@media(max-width:700px){#realtorForm .form-grid{grid-template-columns:1fr}}


/* Crown V9.2 — Editable FROG and action routing */
.frog-card{scroll-margin-top:24px}
.frog-edit-grid{display:grid;grid-template-columns:1fr;gap:12px}
.frog-edit-grid label{display:grid;gap:6px;color:var(--text);font-size:12px;font-weight:800}
.frog-edit-grid textarea{min-height:70px;background:#fbfdff;font-weight:500;line-height:1.45}
.frog-edit-grid textarea:focus{outline:3px solid rgba(215,166,42,.22);border-color:var(--gold);background:#fff}
.frog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px}
.frog-highlight{animation:frogPulse 1.25s ease;box-shadow:0 0 0 5px rgba(215,166,42,.25),0 16px 40px rgba(9,28,47,.11)}
@keyframes frogPulse{0%,100%{transform:translateY(0)}45%{transform:translateY(-3px)}}
@media(max-width:700px){.frog-actions{align-items:stretch;flex-direction:column}}


/* Crown V9.3 — queued workflow edits */
.realtor-create-actions{display:flex;gap:9px;flex-wrap:wrap}
.meeting-required-banner{
  margin-top:16px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--gold-soft);
  color:#725500;
  border:1px solid #ead087;
  font-weight:800
}
.meeting-details>label{display:grid;gap:6px;margin-top:14px;font-weight:700}
.batch-upload-card{width:min(900px,100%)}
.batch-upload-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}
.file-upload-button{
  display:inline-flex!important;
  width:auto!important;
  margin:0!important;
  padding:10px 15px;
  border-radius:9px;
  background:var(--navy-2);
  color:#fff;
  font-weight:800;
  cursor:pointer
}
.file-upload-button input{display:none}
.batch-summary{
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:13px 15px;
  background:#f4f7f9;
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:12px
}
.batch-summary span{color:var(--muted)}
.batch-preview-wrap{max-height:360px;overflow:auto;border:1px solid var(--line);border-radius:12px}
.batch-preview-table{width:100%;border-collapse:collapse}
.batch-preview-table th,.batch-preview-table td{padding:10px;border-bottom:1px solid var(--line);text-align:left;font-size:13px}
.batch-preview-table th{position:sticky;top:0;background:#f4f7f9;color:var(--muted);text-transform:uppercase;font-size:11px}
.batch-row-error{background:#fff5f5}
.batch-row-error td:last-child{color:#9b3030;font-weight:700}
.batch-row-valid td:last-child{color:#167044;font-weight:800}
#importBatchRealtors:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:700px){
  .batch-summary{flex-direction:column}
  .realtor-create-actions{width:100%}
}


/* Crown V9.4 — Daily Activity Log */
.activity-view-tabs{
  display:flex;
  gap:8px;
  margin-top:18px
}
.activity-view-tabs button{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  padding:10px 15px;
  font-weight:800
}
.activity-view-tabs button.active{
  background:var(--navy);
  color:#fff;
  border-color:var(--navy)
}
.worksheet-shell{margin-top:14px;padding:0;overflow:hidden}
.worksheet-heading{padding:18px 20px;margin:0;border-bottom:1px solid var(--line)}
.worksheet-actions{display:flex;gap:9px}
.worksheet-scroll{
  overflow:auto;
  max-height:620px;
  border-bottom:1px solid var(--line)
}
.activity-worksheet{
  width:100%;
  min-width:1420px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed
}
.activity-worksheet th{
  position:sticky;
  top:0;
  z-index:3;
  background:#f1f5f8;
  color:#536b80;
  padding:10px 8px;
  border-right:1px solid #d9e1e7;
  border-bottom:1px solid #cfd9e0;
  text-align:left;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em
}
.activity-worksheet td{
  position:relative;
  padding:0;
  border-right:1px solid #e0e6eb;
  border-bottom:1px solid #e0e6eb;
  background:#fff;
  vertical-align:top
}
.activity-worksheet .row-number{
  width:44px;
  min-width:44px;
  text-align:center;
  background:#f6f8fa;
  color:#708090;
  font-weight:800
}
.activity-worksheet th:nth-child(2){width:240px}
.activity-worksheet th:nth-child(3){width:190px}
.activity-worksheet th:nth-child(4){width:220px}
.activity-worksheet th:nth-child(5){width:180px}
.activity-worksheet th:nth-child(6){width:145px}
.activity-worksheet th:nth-child(7){width:100px}
.activity-worksheet th:nth-child(8){width:300px}
.activity-worksheet th:nth-child(9){width:150px}
.worksheet-input{
  width:100%;
  min-height:43px;
  border:0;
  border-radius:0;
  background:transparent;
  padding:9px 8px;
  font:inherit
}
.worksheet-input:focus{
  position:relative;
  z-index:2;
  outline:2px solid var(--gold);
  outline-offset:-2px;
  background:#fffdf6
}
.worksheet-input:disabled{background:#f6faf7;color:#4b6656}
.worksheet-agent-cell{padding-bottom:17px!important}
.worksheet-match-hint{
  position:absolute;
  left:8px;
  right:5px;
  bottom:3px;
  overflow:hidden;
  color:#728496;
  font-size:9px;
  white-space:nowrap;
  text-overflow:ellipsis
}
.worksheet-row-status{padding:8px!important}
.worksheet-row-error td{background:#fff1f1}
.worksheet-row-ready td{background:#f9fffb}
.worksheet-summary{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 20px;
  background:#eef9f2;
  border-bottom:1px solid #cfe8d8
}
.worksheet-summary span{color:#4e6a58}
.worksheet-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:13px 20px;
  color:var(--muted);
  font-size:12px
}
@media(max-width:800px){
  .worksheet-heading,.worksheet-footer,.worksheet-summary{align-items:stretch;flex-direction:column}
}


/* Crown V9.4.1 — custom Realtor lookup */
.worksheet-agent-lookup{position:relative}
.worksheet-agent-results{
  position:absolute;
  top:42px;
  left:3px;
  width:390px;
  max-height:310px;
  overflow:auto;
  z-index:30;
  background:#fff;
  border:1px solid #bfcbd4;
  border-radius:10px;
  box-shadow:0 16px 36px rgba(9,28,47,.20);
  padding:5px
}
.worksheet-agent-option{
  display:grid;
  gap:3px;
  width:100%;
  border:0;
  border-radius:7px;
  background:#fff;
  padding:9px 10px;
  text-align:left;
  cursor:pointer
}
.worksheet-agent-option:hover,.worksheet-agent-option:focus{
  background:#eef4f8;
  outline:none
}
.worksheet-agent-option strong{color:var(--text);font-size:13px}
.worksheet-agent-option span{color:var(--muted);font-size:11px}
.worksheet-create-option{
  margin-top:4px;
  border-top:1px solid var(--line);
  border-radius:0 0 7px 7px;
  background:var(--gold-soft)
}
.worksheet-create-option strong{color:#755500}


/* Crown V9.5 — Workflow & Culture */
.realtor-directory-search{
  flex:1 1 520px!important;
  min-width:420px
}
.directory-toolbar #statusFilter{flex:0 0 190px}
.meaningful-conversations-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:22px;
  margin-top:18px;
  padding:22px;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,var(--navy),var(--navy-3));
  box-shadow:var(--shadow)
}
.meaningful-label{color:var(--gold);font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.meaningful-conversations-card h2{margin:5px 0 3px}
.meaningful-conversations-card p{margin:0;color:#d5e2ec}
.meaningful-score{display:flex;align-items:baseline;gap:5px}
.meaningful-score strong{font-size:48px;line-height:1}
.meaningful-score span{font-size:18px;color:#c8d7e3}
.meaningful-progress{grid-column:1/-1;height:10px;background:rgba(255,255,255,.16);border-radius:999px;overflow:hidden}
.meaningful-progress div{height:100%;background:var(--gold);border-radius:999px}
.meaningful-conversations-card.goal-complete{background:linear-gradient(135deg,#0c5135,#19714c)}
.wins-dashboard-list{display:grid;gap:10px}
.wins-dashboard-list article{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.wins-dashboard-list span{color:var(--muted)}
.wins-layout{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(0,1.4fr);gap:18px;margin-top:18px;align-items:start}
.win-composer{position:sticky;top:18px}
.win-composer>label{display:grid;gap:6px;margin-top:14px;font-weight:700}
.wins-feed{display:grid;gap:14px}
.win-card{position:relative}
.win-card.manager-highlight{border-color:#e3bf58;box-shadow:0 0 0 2px rgba(215,166,42,.13)}
.manager-highlight-label{display:inline-flex;margin-bottom:12px;color:#765600;background:var(--gold-soft);border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;text-transform:uppercase}
.win-card-head{display:flex;justify-content:space-between;gap:18px}
.win-card-head h3{margin:10px 0 3px}
.win-card-head p{margin:0;color:var(--muted);font-size:13px}
.win-celebrate-count{font-size:26px;color:var(--gold)}
.win-learning,.manager-highlight-note{display:grid;gap:4px;margin-top:14px;padding:12px;border-radius:11px;background:#f5f8fa}
.manager-highlight-note{background:var(--gold-soft);color:#654c0a;font-weight:700}
.win-actions{display:flex;gap:8px;margin-top:14px}
.win-actions button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 12px;font-weight:800}
.win-comments{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.win-comments p{margin:6px 0;padding:8px 10px;background:#f5f7f9;border-radius:9px}
.win-comment-entry{display:flex;gap:8px;margin-top:10px}
.win-comment-entry input{flex:1}
@media(max-width:900px){
  .wins-layout{grid-template-columns:1fr}
  .win-composer{position:static}
  .meaningful-conversations-card{grid-template-columns:1fr}
  .meaningful-progress{grid-column:1}
  .realtor-directory-search{min-width:0!important;width:100%}
}


/* Crown V9.6 — Stability Sprint */
.directory-toolbar{
  display:grid!important;
  grid-template-columns:minmax(420px,1fr) 190px auto!important;
  align-items:center;
  gap:10px
}
.realtor-directory-search{width:100%!important;min-width:0!important}
.realtor-create-actions{justify-self:end;flex-wrap:nowrap}
.settings-backup-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.import-backup-button{position:relative;overflow:hidden;cursor:pointer}
.import-backup-button input{position:absolute;inset:0;opacity:0;cursor:pointer}
.fatal-error-card{
  max-width:760px;margin:60px auto;padding:28px;background:#fff;
  border:1px solid #e2b7b7;border-radius:16px;box-shadow:var(--shadow)
}
.fatal-error-card pre{white-space:pre-wrap;padding:12px;background:#fff4f4;border-radius:10px}
@media(max-width:950px){
  .directory-toolbar{grid-template-columns:1fr!important}
  .realtor-create-actions{justify-self:stretch}
}


/* Crown V11 — Coach Intelligence */
.crown-coach-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  margin-top:18px;
  padding:26px;
  border-radius:20px;
  color:#fff;
  background:linear-gradient(135deg,#081d31,#173c58);
  box-shadow:var(--shadow)
}
.crown-coach-hero h2{font-size:31px;margin:7px 0}
.crown-coach-hero p{max-width:850px;color:#d5e2ec;margin:0}
.coach-doctrine-badge{
  display:grid;
  place-items:center;
  min-width:150px;
  padding:18px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  background:rgba(255,255,255,.08)
}
.coach-doctrine-badge strong{font-size:38px;color:var(--gold)}
.coach-doctrine-badge span{font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.coach-composer{margin-top:18px}
.coach-composer>label{display:grid;gap:7px;margin-top:14px;font-weight:800}
.coach-prompt-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.coach-prompt-chips button{
  border:1px solid var(--line);
  background:#f5f8fa;
  border-radius:999px;
  padding:8px 11px;
  color:var(--text);
  font-weight:800
}
.coach-results{display:grid;gap:16px;margin-top:18px}
.crown-coach-response{border-left:5px solid var(--gold)}
.coach-response-head{display:flex;justify-content:space-between;gap:15px;align-items:start}
.coach-response-head h3{margin:8px 0}
.coach-response-head small{color:var(--muted)}
.coach-user-question{
  margin:12px 0 16px;
  padding:12px 14px;
  background:#f4f7f9;
  border-radius:11px;
  font-weight:700
}
.crown-coach-response section{margin-top:14px}
.crown-coach-response section>span{
  display:block;
  color:#6c7c8b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase
}
.crown-coach-response section p{margin:5px 0 0;line-height:1.55}
.coach-primary-action,.coach-challenge{
  padding:14px;
  border-radius:12px;
  background:#eef6f1
}
.coach-challenge{background:var(--gold-soft)}
.coach-exact-language blockquote{
  margin:7px 0 0;
  padding:14px 16px;
  border-left:4px solid var(--gold);
  background:#fffaf0;
  border-radius:0 10px 10px 0;
  font-size:16px;
  font-weight:700;
  line-height:1.55
}
.crown-coach-response details{margin-top:16px}
.crown-coach-response summary{cursor:pointer;font-weight:800}
.coach-context-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(90px,1fr));
  gap:8px;
  margin-top:10px
}
.coach-context-grid div{
  display:grid;
  gap:3px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafb
}
.coach-context-grid span{font-size:10px;color:var(--muted);text-transform:uppercase}
.coach-empty-state{text-align:center;padding:35px}
.doctrine-panel{margin-top:18px}
.doctrine-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.doctrine-grid div{padding:11px 13px;border-radius:10px;background:#f4f7f9;font-weight:700}
@media(max-width:900px){
  .crown-coach-hero{grid-template-columns:1fr}
  .coach-doctrine-badge{justify-self:start}
  .coach-context-grid{grid-template-columns:repeat(2,1fr)}
  .doctrine-grid{grid-template-columns:1fr}
}

/* Crown V11.1 — Thinking Like Crown */
.meaningful-conversations-card.meaningful-blue{background:linear-gradient(135deg,#081d31,#173c58);border-color:#264e6d}
.dashboard-metrics-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.metric-card-button{text-align:left;font:inherit;cursor:pointer;width:100%}
.metric-card-button:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.dashboard-meetings-panel{margin:18px 0}
.proactive-coach-card{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:18px 0;border-left:5px solid var(--gold)}
.proactive-coach-card p{margin:5px 0}.compact-feed{min-height:0}.compact-priority{padding:10px 0}.compact-priority p{margin:2px 0;line-height:1.25}.compact-feed .dashboard-list{gap:4px}.compact-feed .wins-dashboard-list article{padding:9px 0}
.profile-intelligence-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.intelligence-score-card{display:grid;gap:6px}.intelligence-score-card>span{font-size:11px;font-weight:900;text-transform:uppercase;color:var(--muted)}.intelligence-score-card>strong{font-size:42px;color:var(--navy)}.relationship-iq-card ul{margin:8px 0 0;padding-left:18px}.relationship-iq-card li{margin:6px 0;line-height:1.35}.relationship-iq-card.warning{border-left:4px solid #bd7a24}
.coach-score-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.coach-score-strip>div{display:grid;gap:4px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:12px}.coach-score-strip span{font-size:10px;text-transform:uppercase;color:var(--muted);font-weight:900}.coach-score-strip strong{font-size:25px}.thinking-partner{padding:14px;border-radius:12px;background:#eef4f8;border-left:4px solid #173c58}.commitment-actions{display:flex;gap:8px;margin-top:10px}
@media(max-width:900px){.dashboard-metrics-two,.profile-intelligence-grid,.coach-score-strip{grid-template-columns:1fr}.proactive-coach-card{align-items:flex-start;flex-direction:column}}


/* Crown V11.2 — Cleaner Workflow */
.dashboard-priorities-only{margin-top:18px}
.coach-composer-first{margin-top:18px}
.win-card .pill{
  font-size:9px!important;
  line-height:1!important;
  padding:4px 7px!important;
  min-height:0!important;
}


/* Crown V11.3 — direct coaching conversation */
.profile-intelligence-grid{display:none!important}

.direct-coach-response{
  max-width:980px;
  margin:0 auto;
  border-left:4px solid var(--gold);
  padding:24px 26px;
}
.crown-coach-label{
  font-size:10px!important;
  padding:5px 9px!important;
}
.direct-coach-response .coach-user-question{
  margin:18px 0;
  background:#f1f5f8;
  font-size:17px;
  line-height:1.45;
}
.coach-direct-overview{
  padding:0!important;
  background:transparent!important;
}
.coach-direct-overview p{
  margin:0!important;
  font-size:20px;
  line-height:1.55!important;
  font-weight:650;
  color:var(--text);
}
.coach-direct-context{
  margin-top:22px!important;
  padding-top:18px;
  border-top:1px solid var(--line);
}
.coach-direct-context h4,
.direct-language h4{
  margin:0 0 8px;
  font-size:14px;
}
.coach-direct-context p{
  margin:0!important;
  color:var(--muted);
  line-height:1.55!important;
}
.direct-language{
  margin-top:22px!important;
}
.direct-language blockquote{
  margin-top:8px;
  font-size:17px;
  line-height:1.55;
  font-weight:700;
}
.direct-coach-response .coach-primary-action,
.direct-coach-response .coach-challenge,
.direct-coach-response details,
.direct-coach-response .thinking-partner,
.direct-coach-response .commitment-actions{
  display:none!important;
}


/* Crown V11.4 — Problem-first Coach */
.coach-composer-first{max-width:980px;margin:18px auto 0}
.coach-composer-first>label{display:grid;gap:7px;margin-top:14px;font-weight:800}
.direct-coach-response .coach-direct-overview p{font-size:19px;line-height:1.58}

/* Crown Coach 2.0 Alpha */
.coach-composer-first{max-width:980px;margin:18px auto 0}.direct-coach-response{max-width:980px;margin-left:auto;margin-right:auto}

/* Brain v0.2 */
.direct-coach-response .coach-direct-overview p{font-weight:650}

/* ============================================================
   CROWN UI PHASE 1 — SAFE VISUAL REFINEMENT
   Preserves existing dashboard features and application logic.
   ============================================================ */

:root{
  --navy:#0b2f4b;
  --navy-2:#123f63;
  --navy-3:#1b557f;
  --gold:#c8a44d;
  --gold-soft:#faf4e5;
  --page:#f5f6f7;
  --card:#ffffff;
  --text:#132235;
  --muted:#6a7888;
  --line:#dde4ea;
  --shadow:0 14px 34px rgba(11,47,75,.08);
}

body{
  background:
    radial-gradient(circle at 100% 0,rgba(200,164,77,.07),transparent 30rem),
    var(--page);
}

.sidebar{
  background:linear-gradient(180deg,#09283f 0%,#0b2f4b 65%,#09263c 100%);
  box-shadow:8px 0 28px rgba(8,30,48,.08);
}

.brand{align-items:center}
.brand-mark{border-color:rgba(200,164,77,.58);background:rgba(255,255,255,.025)}
.nav button{min-height:44px;transition:background .16s ease,color .16s ease,transform .16s ease}
.nav button:hover{transform:translateX(2px)}
.nav button.active{border-left:3px solid var(--gold);background:linear-gradient(90deg,rgba(200,164,77,.18),rgba(255,255,255,.07))}
.main{padding:30px 34px 64px}
.page-heading{align-items:flex-end;margin-bottom:18px}
.page-heading h1{font-size:32px;line-height:1.1;letter-spacing:-.025em}
.page-heading p{max-width:720px;line-height:1.5}
.card,.metric-card,.priority-card,.list-row,.meeting-row,.report-row,.notification-item,.note-item{border-color:var(--line);box-shadow:0 5px 18px rgba(9,28,47,.045)}
.card{border-radius:18px;padding:22px}
.card h3{letter-spacing:-.015em}
.metric-grid{gap:16px}
.metric-card{min-height:126px;padding:18px;border-radius:16px;background:linear-gradient(180deg,#fff,#fbfcfd)}
.metric-card strong{margin-top:10px;font-size:32px;letter-spacing:-.03em}
.meaningful-conversations-card{padding:26px;border:1px solid rgba(255,255,255,.08);border-radius:20px;background:radial-gradient(circle at 88% 18%,rgba(200,164,77,.16),transparent 18rem),linear-gradient(135deg,#081f34,#123f63)}
.meaningful-score strong{font-size:54px;letter-spacing:-.04em}
.meaningful-progress{height:12px}
.priority-card{border-radius:16px;padding:17px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.priority-card:hover{transform:translateY(-2px);border-color:#d9c28a;box-shadow:0 12px 28px rgba(9,28,47,.08)}
.priority-rank{width:38px;height:38px;background:linear-gradient(145deg,#fbf4df,#ead394)}
.primary-button{min-height:42px;padding:11px 17px;border:1px solid #b89035;border-radius:10px;background:linear-gradient(180deg,#d6b65e,#c8a44d);color:#142b3d;box-shadow:0 3px 10px rgba(140,105,25,.18);transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
.primary-button:hover{transform:translateY(-1px);filter:brightness(1.035);box-shadow:0 7px 17px rgba(140,105,25,.23)}
.secondary-button,.icon-button{transition:background .14s ease,border-color .14s ease,transform .14s ease}
.secondary-button:hover,.icon-button:hover{border-color:#d8c488;background:#fffaf0}
select,input,textarea{border-color:#d7e0e7;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}
select:focus,input:focus,textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(200,164,77,.18)}
.activity-view-tabs{margin-top:20px}
.activity-view-tabs button{min-height:42px;border-radius:11px}
.activity-view-tabs button.active{border-color:#09283f;background:#09283f;box-shadow:0 5px 14px rgba(9,40,63,.16)}
.worksheet-shell{border-radius:18px;box-shadow:0 6px 22px rgba(9,28,47,.05)}
.worksheet-heading{padding:20px 22px;background:linear-gradient(180deg,#fff,#fbfcfd)}
.worksheet-scroll{scrollbar-color:#b8c5cf #edf1f4;scrollbar-width:thin}
.activity-worksheet th{height:44px;background:#eef3f6;color:#435d73}
.activity-worksheet td{min-height:44px}
.crown-coach-hero{border:1px solid rgba(255,255,255,.08);background:radial-gradient(circle at 90% 12%,rgba(200,164,77,.15),transparent 17rem),linear-gradient(135deg,#081d31,#173c58)}
.direct-coach-response{border-left:5px solid var(--gold);border-radius:18px;box-shadow:0 10px 30px rgba(9,28,47,.07)}
.coach-user-question{border:1px solid #e1e7ec}
.coach-direct-overview p{letter-spacing:-.012em}
.profile-hero{background:radial-gradient(circle at 90% 20%,rgba(200,164,77,.17),transparent 20rem),linear-gradient(135deg,#0b2f4b,#1b557f)}
.relationship-progress-fill,.meaningful-progress div{background:linear-gradient(90deg,#d6b65e,#c8a44d)}

@media(max-width:820px){
  .main{padding:22px 16px 52px}
  .page-heading{align-items:flex-start}
  .page-heading h1{font-size:27px}
}
/* ============================================================
   CROWN UI PHASE 2 — DASHBOARD COMMAND CENTER
   Dashboard-only visual refinement.
   Preserves all existing HTML structure, IDs, and JS behavior.
   ============================================================ */

/* ---------- Dashboard page rhythm ---------- */

.dashboard-priorities-only{
  display:grid;
  gap:18px;
  margin-top:20px;
}

.dashboard-priorities-only > .card,
.dashboard-meetings-panel,
.proactive-coach-card{
  margin:0;
}

.dashboard-split{
  grid-template-columns:minmax(0,1.62fr) minmax(310px,.78fr);
  gap:20px;
  align-items:start;
  margin-top:20px;
}

.dashboard-split > *{
  min-width:0;
}

.dashboard-split .card{
  height:100%;
}


/* ---------- Dashboard metric hierarchy ---------- */

.dashboard-metrics-two{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}

.dashboard-metrics-two .metric-card{
  position:relative;
  overflow:hidden;
  min-height:142px;
  padding:20px;
}

.dashboard-metrics-two .metric-card::after{
  content:"";
  position:absolute;
  right:-28px;
  bottom:-42px;
  width:120px;
  height:120px;
  border-radius:50%;
  background:rgba(200,164,77,.075);
  pointer-events:none;
}

.dashboard-metrics-two .metric-card span{
  position:relative;
  z-index:1;
  font-size:11px;
  letter-spacing:.07em;
}

.dashboard-metrics-two .metric-card strong{
  position:relative;
  z-index:1;
  margin-top:13px;
  font-size:38px;
  line-height:1;
}

.dashboard-metrics-two .metric-card small{
  position:relative;
  z-index:1;
  max-width:90%;
  margin-top:10px;
  line-height:1.4;
}

.metric-card-button{
  appearance:none;
  display:block;
  width:100%;
  color:inherit;
  text-align:left;
  cursor:pointer;
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.metric-card-button:hover{
  transform:translateY(-3px);
  border-color:#d9c58f;
  box-shadow:0 14px 32px rgba(9,28,47,.09);
}

.metric-card-button:focus-visible{
  outline:3px solid rgba(200,164,77,.28);
  outline-offset:3px;
}


/* ---------- Meaningful conversations hero ---------- */

.meaningful-conversations-card{
  position:relative;
  isolation:isolate;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px 34px;
  overflow:hidden;
  color:#fff;
}

.meaningful-conversations-card::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-110px;
  right:-70px;
  width:300px;
  height:300px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:50%;
}

.meaningful-conversations-card::after{
  content:"";
  position:absolute;
  z-index:-1;
  top:-58px;
  right:-15px;
  width:180px;
  height:180px;
  border:1px solid rgba(200,164,77,.14);
  border-radius:50%;
}

.meaningful-conversations-card h2{
  max-width:720px;
  margin:7px 0 5px;
  color:#fff;
  font-size:27px;
  line-height:1.16;
  letter-spacing:-.025em;
}

.meaningful-conversations-card p{
  max-width:760px;
  margin:0;
  color:#d7e3ed;
  line-height:1.5;
}

.meaningful-label{
  color:var(--gold);
}

.meaningful-score{
  justify-content:flex-end;
  min-width:145px;
}

.meaningful-score strong{
  color:#fff;
  font-size:58px;
}

.meaningful-score span{
  color:#d7e3ed;
}

.meaningful-progress{
  grid-column:1 / -1;
  height:11px;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.18);
}

.meaningful-progress div{
  min-width:4px;
  box-shadow:0 0 12px rgba(200,164,77,.26);
}


/* ---------- Proactive coach card ---------- */

.proactive-coach-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:22px;
  overflow:hidden;
  padding:21px 22px;
  border-left:0;
  border-color:#e4d39f;
  background:
    linear-gradient(90deg,rgba(250,244,229,.92),#fff 62%);
}

.proactive-coach-card::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:5px;
  background:linear-gradient(180deg,#d6b65e,#b88d2d);
}

.proactive-coach-card h3{
  margin:0;
  font-size:18px;
}

.proactive-coach-card p{
  max-width:850px;
  margin:6px 0 0;
  color:#596b7b;
  line-height:1.5;
}

.proactive-coach-card .primary-button{
  white-space:nowrap;
}


/* ---------- Priority queue ---------- */

.dashboard-list{
  gap:10px;
}

.priority-card{
  grid-template-columns:40px minmax(0,1fr) auto;
  gap:15px;
  min-height:76px;
}

.priority-card h4{
  font-size:15px;
  line-height:1.3;
}

.priority-card p{
  margin-top:4px;
  line-height:1.4;
}

.priority-card .priority-pill,
.priority-card .pill{
  justify-self:end;
  white-space:nowrap;
}

.priority-rank{
  flex:none;
  box-shadow:inset 0 0 0 1px rgba(130,95,0,.12);
}

.compact-feed{
  min-height:0;
}

.compact-feed .dashboard-list{
  gap:7px;
}

.compact-priority{
  min-height:62px;
  padding:12px 14px;
}

.compact-priority .priority-rank{
  width:32px;
  height:32px;
  font-size:12px;
}

.compact-priority h4{
  font-size:14px;
}

.compact-priority p{
  margin-top:3px;
  font-size:13px;
  line-height:1.3;
}


/* ---------- Card headings ---------- */

.card-heading,
.section-heading{
  gap:18px;
  margin-bottom:16px;
}

.card-heading h3,
.section-heading h3{
  margin:0;
}

.card-heading p,
.section-heading p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

.card-heading .pill,
.section-heading .pill{
  flex:none;
}


/* ---------- Meetings panel ---------- */

.dashboard-meetings-panel{
  overflow:hidden;
}

.dashboard-meetings-panel .meeting-list{
  gap:9px;
}

.dashboard-meetings-panel .meeting-row{
  position:relative;
  min-height:72px;
  padding:14px 15px;
  border-radius:14px;
  box-shadow:none;
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.dashboard-meetings-panel .meeting-row:hover{
  transform:translateX(2px);
  border-color:#cfdae2;
  background:#fbfcfd;
}

.dashboard-meetings-panel .meeting-row h4{
  font-size:14px;
}

.dashboard-meetings-panel .meeting-row p{
  line-height:1.35;
}


/* ---------- Wins preview ---------- */

.wins-dashboard-list{
  gap:0;
}

.wins-dashboard-list article{
  position:relative;
  align-items:flex-start;
  gap:11px;
  padding:13px 0;
}

.wins-dashboard-list article:first-child{
  padding-top:2px;
}

.wins-dashboard-list article:last-child{
  padding-bottom:2px;
  border-bottom:0;
}

.wins-dashboard-list article > div{
  min-width:0;
}

.wins-dashboard-list strong{
  display:block;
  margin-bottom:3px;
  font-size:14px;
  line-height:1.35;
}

.wins-dashboard-list span{
  display:block;
  font-size:12px;
  line-height:1.4;
}


/* ---------- Dashboard empty states ---------- */

.dashboard-list:empty,
.meeting-list:empty,
.wins-dashboard-list:empty{
  min-height:110px;
  place-items:center;
  color:var(--muted);
}

.dashboard-list:empty::after,
.meeting-list:empty::after,
.wins-dashboard-list:empty::after{
  content:"Nothing needs your attention here.";
  display:grid;
  place-items:center;
  width:100%;
  min-height:110px;
  padding:20px;
  border:1px dashed #ccd7df;
  border-radius:13px;
  background:#fafcfd;
  text-align:center;
  font-size:13px;
}


/* ---------- Dashboard buttons and pills ---------- */

.dashboard-priorities-only .secondary-button,
.dashboard-split .secondary-button,
.dashboard-meetings-panel .secondary-button{
  background:#fff;
}

.dashboard-priorities-only .secondary-button:hover,
.dashboard-split .secondary-button:hover,
.dashboard-meetings-panel .secondary-button:hover{
  color:#725500;
}

.dashboard-priorities-only .pill,
.dashboard-split .pill,
.dashboard-meetings-panel .pill{
  padding:6px 10px;
  font-size:10px;
  letter-spacing:.02em;
}


/* ---------- Responsive dashboard ---------- */

@media(max-width:1180px){
  .dashboard-split{
    grid-template-columns:minmax(0,1.35fr) minmax(290px,.8fr);
  }

  .meaningful-conversations-card{
    gap:20px;
  }

  .meaningful-score strong{
    font-size:50px;
  }
}

@media(max-width:980px){
  .dashboard-split{
    grid-template-columns:1fr;
  }

  .dashboard-split .card{
    height:auto;
  }

  .proactive-coach-card{
    grid-template-columns:1fr;
  }

  .proactive-coach-card .primary-button{
    justify-self:start;
  }
}

@media(max-width:700px){
  .dashboard-metrics-two{
    grid-template-columns:1fr;
  }

  .meaningful-conversations-card{
    grid-template-columns:1fr;
    padding:22px;
  }

  .meaningful-score{
    justify-content:flex-start;
  }

  .meaningful-score strong{
    font-size:46px;
  }

  .meaningful-progress{
    grid-column:1;
  }

  .priority-card,
  .compact-priority{
    grid-template-columns:36px minmax(0,1fr);
  }

  .priority-card > :last-child,
  .compact-priority > :last-child{
    grid-column:2;
    justify-self:start;
  }

  .card-heading,
  .section-heading{
    align-items:flex-start;
    flex-direction:column;
  }
}
/* ============================================================
   CROWN UI PHASE 3 — RELATIONSHIP WORKSPACE / COACH CARD
   Styles the primary Crown Coach recommendation experience.
   ============================================================ */

.crown-coach-workspace{
  position:relative;
  overflow:hidden;
  margin:50px 0 18px;
  padding:26px;
  border:1px solid #dfc77f;
  border-radius:20px;
  background:
    radial-gradient(circle at 94% 8%,rgba(200,164,77,.15),transparent 18rem),
    linear-gradient(180deg,#fffdf8 0%,#fff 58%);
  box-shadow:0 14px 36px rgba(9,28,47,.08);
}

.crown-coach-workspace::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:6px;
  background:linear-gradient(180deg,#d6b65e,#b98e2e);
}

.coach-workspace-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding-bottom:20px;
  border-bottom:1px solid #eadfbf;
}

.coach-workspace-head h2{
  margin:5px 0 0;
  font-size:28px;
  line-height:1.15;
  letter-spacing:-.025em;
}

.coach-workspace-head .eyebrow{
  color:#8a6814;
}

.coach-workspace-head .pill{
  flex:none;
  margin-top:2px;
}

.coach-assignment-content{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(280px,.85fr);
  gap:18px;
  margin-top:22px;
}

.coach-assignment-primary,
.coach-assignment-detail,
.coach-suggested-language{
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
}

.coach-assignment-primary{
  grid-row:span 2;
  padding:22px;
  background:
    linear-gradient(145deg,#fff 0%,#fffaf0 100%);
  border-color:#e5d4a3;
}

.coach-assignment-primary h3{
  margin:8px 0 10px;
  font-size:24px;
  line-height:1.22;
  letter-spacing:-.02em;
}

.coach-assignment-primary p,
.coach-assignment-detail p,
.coach-suggested-language blockquote{
  margin:0;
  color:#536577;
  line-height:1.58;
}

.coach-assignment-detail{
  padding:18px 19px;
}

.coach-suggested-language{
  grid-column:1 / -1;
  padding:20px;
  background:#f6f8fa;
}

.coach-suggested-language blockquote{
  margin-top:9px;
  padding:15px 17px;
  border-left:4px solid var(--gold);
  border-radius:0 11px 11px 0;
  background:#fff;
  color:var(--text);
  font-size:16px;
  font-weight:650;
}

.coach-field-label{
  display:block;
  color:#758392;
  font-size:10px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.coach-recommendation-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid #eadfbf;
}

.coach-recommendation-actions .primary-button,
.coach-recommendation-actions .secondary-button{
  min-height:42px;
}

.coach-recommendation-actions .primary-button{
  flex:1 1 190px;
}

.coach-recommendation-actions .secondary-button{
  flex:1 1 180px;
}

.coach-recommendation-actions .secondary-button:last-child{
  color:#8d2a2a;
  border-color:#e7c0c0;
  background:#fffafa;
}

.coach-recommendation-actions .secondary-button:last-child:hover{
  border-color:#d99c9c;
  background:var(--red-soft);
}

.coach-accountability-note{
  margin:14px 0 0;
  color:#768493;
  font-size:12px;
  line-height:1.45;
  text-align:center;
}

@media(max-width:900px){
  .coach-assignment-content{
    grid-template-columns:1fr;
  }

  .coach-assignment-primary{
    grid-row:auto;
  }

  .coach-suggested-language{
    grid-column:1;
  }
}

@media(max-width:700px){
  .crown-coach-workspace{
    padding:21px 18px 20px;
  }

  .coach-workspace-head{
    flex-direction:column;
  }

  .coach-workspace-head h2{
    font-size:24px;
  }

  .coach-assignment-primary h3{
    font-size:21px;
  }

  .coach-recommendation-actions{
    flex-direction:column;
  }

  .coach-recommendation-actions .primary-button,
  .coach-recommendation-actions .secondary-button{
    width:100%;
    flex:none;
  }

  .coach-accountability-note{
    text-align:left;
  }
}
/* ============================================================
   CROWN UI PHASE 4 — COMPLETE TODAY'S ASSIGNMENT
   Clipboard-style execution workspace beneath Crown Coach.
   ============================================================ */

.assignment-workspace{
  margin:18px 0;
  padding:24px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 24px rgba(9,28,47,.05);
}

.assignment-workspace-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line);
}

.assignment-workspace-head h2{
  margin:5px 0 6px;
  font-size:24px;
  line-height:1.2;
  letter-spacing:-.02em;
}

.assignment-workspace-head p:last-child{
  max-width:720px;
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.assignment-checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:20px;
}

.assignment-group{
  padding:20px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fbfcfd;
}

.assignment-group h3{
  margin:0 0 12px;
  font-size:16px;
  letter-spacing:-.01em;
}

.assignment-check{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:13px 0;
  border-bottom:1px dashed #d7e0e7;
  color:var(--text);
  font-size:14px;
  font-weight:650;
  line-height:1.4;
  cursor:pointer;
}

.assignment-check:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.assignment-check input{
  flex:none;
  width:20px;
  height:20px;
  margin:0;
  accent-color:var(--gold);
}

.assignment-check:has(input:checked){
  color:#597064;
  text-decoration:line-through;
  text-decoration-color:#9bb0a4;
}

.assignment-check:has(input:checked) input{
  accent-color:var(--green);
}

@media(max-width:800px){
  .assignment-workspace-head{
    flex-direction:column;
  }

  .assignment-checklist{
    grid-template-columns:1fr;
  }
}
/* ============================================================
   CROWN UI PHASE 4 — ASSIGNMENT EXECUTION WORKSPACE
   Mission first. Evidence second. Analytics last.
   ============================================================ */

.assignment-workspace{
  margin:18px 0;
  padding:24px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 24px rgba(9,28,47,.05);
}

.assignment-workspace-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding-bottom:18px;
  border-bottom:1px solid var(--line);
}

.assignment-workspace-head h2{
  margin:5px 0 6px;
  font-size:24px;
  line-height:1.2;
  letter-spacing:-.02em;
}

.assignment-workspace-head p:last-child{
  max-width:720px;
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.assignment-execution-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:18px;
  margin-top:20px;
}

.assignment-task-list,
.assignment-notes-panel{
  padding:20px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fbfcfd;
}

.assignment-task-list h3{
  margin:0 0 10px;
  font-size:17px;
}

.assignment-check{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 0;
  border-bottom:1px dashed #d7e0e7;
  cursor:pointer;
}

.assignment-check:last-child{
  border-bottom:0;
}

.assignment-check input{
  flex:none;
  width:20px;
  height:20px;
  margin:2px 0 0;
  accent-color:var(--gold);
}

.assignment-check span{
  flex:1;
  min-width:0;
}

.assignment-check strong{
  display:block;
  font-size:14px;
  line-height:1.35;
}

.assignment-check small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.assignment-check:has(input:checked) strong{
  color:#587064;
  text-decoration:line-through;
  text-decoration-color:#9eb0a6;
}

.assignment-check:has(input:checked) input{
  accent-color:var(--green);
}

.assignment-notes-panel label{
  display:grid;
  gap:8px;
}

.assignment-notes-panel textarea{
  min-height:180px;
  background:#fff;
}

.assignment-record-links{
  display:grid;
  gap:9px;
  margin-top:18px;
}

.assignment-record-links .secondary-button{
  width:100%;
  text-align:left;
}

.assignment-completion-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:20px;
  padding:18px 20px;
  border:1px solid #dfc77f;
  border-radius:14px;
  background:var(--gold-soft);
}

.assignment-completion-bar strong{
  display:block;
  font-size:15px;
}

.assignment-completion-bar span{
  display:block;
  margin-top:4px;
  color:#6f6447;
  font-size:12px;
  line-height:1.4;
}

.assignment-completion-bar .primary-button{
  flex:none;
  min-width:190px;
}

@media(max-width:900px){
  .assignment-execution-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .assignment-workspace-head,
  .assignment-completion-bar{
    align-items:stretch;
    flex-direction:column;
  }

  .assignment-completion-bar .primary-button{
    width:100%;
    min-width:0;
  }
}
<section class="relationship-clipboard">

    <div class="clipboard-header">
        <div>
            <p class="eyebrow">Relationship Clipboard</p>
            <h2>What Crown Knows</h2>
            <p>
                Information that has already been learned about this Realtor.
                Complete items stay checked forever unless updated.
            </p>
        </div>

        <div class="pill">
            ${progress}% Complete
        </div>
    </div>

    <div class="clipboard-grid">

        <div class="clipboard-section">

            <h3>Personal</h3>

            ${renderClipboardPersonal(r)}

        </div>

        <div class="clipboard-section">

            <h3>Business</h3>

            ${renderClipboardBusiness(r)}

        </div>

        <div class="clipboard-section">

            <h3>Relationship</h3>

            ${renderClipboardRelationship(r)}

        </div>

        <div class="clipboard-section">

            <h3>Crown Opportunities</h3>

            ${renderClipboardOpportunities(r)}

        </div>

    </div>
/* ============================================================
   CROWN UI PHASE 6 — COACHING DASHBOARD
   ============================================================ */

.coach-mission-card{
  margin-top:20px;
  padding:22px;
  border:1px solid #e5d4a3;
  border-radius:16px;
  background:linear-gradient(145deg,#fff 0%,#fffaf0 100%);
}

.coach-mission-card h3{
  margin:8px 0 10px;
  font-size:25px;
  line-height:1.22;
  letter-spacing:-.02em;
}

.coach-mission-card p{
  margin:0;
  color:var(--muted);
  line-height:1.58;
}

.coach-two-column{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  margin-top:18px;
}

.coach-column{
  display:grid;
  gap:18px;
  align-content:start;
}

.coach-card{
  padding:20px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
}

.coach-card p{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.55;
}

.coach-card ul{
  margin:12px 0 0;
  padding-left:19px;
}

.coach-card li{
  margin:8px 0;
  line-height:1.42;
}

.coach-card.warning{
  border-color:#e8c5c5;
  background:#fffafa;
}

.coach-card.warning .coach-field-label{
  color:#9a3c3c;
}

.coach-checklist{
  list-style:none;
  padding-left:0!important;
}

.coach-checklist li{
  padding:9px 0;
  border-bottom:1px dashed #d9e1e7;
}

.coach-checklist li:last-child{
  border-bottom:0;
}

.language-block{
  margin-top:15px;
}

.language-block:first-of-type{
  margin-top:12px;
}

.language-block h4{
  margin:0 0 7px;
  font-size:13px;
}

.language-block blockquote{
  margin:0;
  padding:14px 16px;
  border-left:4px solid var(--gold);
  border-radius:0 10px 10px 0;
  background:#f7f9fb;
  color:var(--text);
  white-space:pre-line;
  line-height:1.55;
  font-weight:650;
}

.coach-complete{
  display:flex;
  justify-content:flex-end;
  margin-top:20px;
  padding-top:20px;
  border-top:1px solid #eadfbf;
}

.coach-complete .primary-button{
  min-width:220px;
}

@media(max-width:900px){
  .coach-two-column{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .coach-mission-card,
  .coach-card{
    padding:18px;
  }

  .coach-mission-card h3{
    font-size:22px;
  }

  .coach-complete{
    justify-content:stretch;
  }

  .coach-complete .primary-button{
    width:100%;
    min-width:0;
  }
}
.profile-identity{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  width:100%;
}

.profile-activity-button{
  flex:0 0 auto;
  white-space:nowrap;
  padding:10px 16px;
}
.relationship-brief-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.relationship-brief-title {
  flex: 0 0 auto;
}

.next-move-card {
  width: 50%;
  max-width: 50%;
  min-width: 0;
}

.next-move-card h3 {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

@media(max-width:900px){
  .next-move-card {
    width: 100%;
    max-width: 100%;
  }
}

.profile-quick-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 40%;
  max-width: 250px;
}

.profile-quick-note input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
}

.profile-quick-note .secondary-button {
  height: 40px;
  white-space: nowrap;
}

.realtor-intelligence-panel {
  margin-top: 14px;
  margin-bottom: 40px;
  width: 40%;
  min-width: 320px;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.realtor-intelligence-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.realtor-intelligence-summary::-webkit-details-marker {
  display: none;
}

.realtor-intelligence-summary > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.realtor-intelligence-summary strong {
  font-size: 14px;
}

.realtor-intelligence-summary span {
  font-size: 13px;
  color: #6f7f90;
}

.intel-expand-label {
  font-size: 12px !important;
  font-weight: 700;
}

.realtor-intelligence-panel[open] .intel-expand-label {
  font-size: 0 !important;
}

.realtor-intelligence-panel[open] .intel-expand-label::after {
  content: "Hide details";
  font-size: 12px;
}

.realtor-intelligence-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.intel-section {
  border: 1px solid #e4e9ee;
  border-radius: 10px;
  padding: 12px;
  background: #fbfcfd;
}

.intel-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.intel-list {
  margin: 0;
  padding-left: 18px;
}

.intel-list li {
  margin: 4px 0;
  line-height: 1.35;
  font-size: 13px;
}

.intel-empty {
  margin: 0;
  font-size: 13px;
  color: #8793a0;
}

.intel-notes-section {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .profile-quick-note {
    flex: 1;
    max-width: none;
  }

  .realtor-intelligence-panel {
    width: 100%;
    min-width: 0;
  }

  .relationship-brief-header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-quick-note {
    max-width: none;
  }

  .realtor-intelligence-content {
    grid-template-columns: 1fr;
  }

  .intel-notes-section {
    grid-column: auto;
  }
}

/* ============================================================
   CROWN COACH — PROFILE LAYOUT PASS
   Success becomes full-width beneath the working columns.
   ============================================================ */

.coach-success-card{
  grid-column:1 / -1;
  margin-top:18px;
}

.coach-two-column{
  align-items:start;
}


/* ============================================================
   CROWN COACH — CURRENT UI PASS
   ============================================================ */

/* More breathing room between Realtor Intelligence and Crown Coach. */
.crown-coach-workspace{
  margin-top:24px;
}

/* Suggested Language now sits directly beneath Today's Assignment. */
.coach-suggested-language-card{
  margin-top:18px;
}

/* Three-line Realtor note field, approximately 50% larger. */
.profile-quick-note{
  flex:0 0 60%;
  max-width:375px;
}

.profile-quick-note textarea{
  flex:1;
  min-width:0;
  min-height:60px;
  height:60px;
  resize:none;
  padding:9px 12px;
  font:inherit;
  line-height:1.35;
}

.profile-quick-note .secondary-button{
  align-self:center;
}

/* Give Relationship Brief text more room before the note field. */
.relationship-brief-header{
  gap:40px;
}

.relationship-brief-title{
  flex:1 1 50%;
  min-width:0;
}

@media(max-width:900px){

  .profile-quick-note{
    flex:1;
    max-width:none;
  }

  .profile-quick-note textarea{
    width:100%;
  }

  .relationship-brief-header{
    gap:20px;
  }

}

/* Keep Relationship Brief narrative in the left half,
   leaving the right side visually reserved for profile actions. */
.relationship-brief-body{
  max-width:50%;
}

.relationship-brief-body p{
  max-width:100%;
}

@media(max-width:900px){
  .relationship-brief-body{
    max-width:100%;
  }
}

/* Align the multi-line note field with the bottom of the Relationship Brief copy. */
.profile-quick-note textarea{
  height:108px;
  min-height:108px;
}

/* ============================================================
   RELATIONSHIP BRIEF — EXPANDED NOTES AREA
   ============================================================ */

.relationship-brief-header{
  align-items:flex-start;
  position:relative;
  min-height:270px;
}

.relationship-brief-title{
  width:50%;
  flex:0 0 50%;
}

.profile-quick-note{
  position:absolute;
  top:0;
  right:0;
  width:36%;
  max-width:none;
  height:270px;
  display:flex;
  align-items:stretch;
  gap:8px;
}

.profile-quick-note textarea{
  width:100%;
  height:100%;
  min-height:270px;
  resize:none;
  box-sizing:border-box;
  padding:12px;
  line-height:1.4;
}

.profile-quick-note .secondary-button{
  align-self:flex-start;
  height:40px;
  flex:0 0 auto;
}

@media(max-width:900px){
  .relationship-brief-header{
    min-height:0;
  }

  .relationship-brief-title{
    width:auto;
    flex:1;
  }

  .profile-quick-note{
    position:static;
    width:100%;
    height:auto;
    max-width:none;
  }

  .profile-quick-note textarea{
    min-height:100px;
    height:100px;
  }
}

/* Let the left-side Relationship Brief content flow naturally.
   The Notes box is absolutely positioned, so it does not need
   the header to reserve vertical space for it. */
.relationship-brief-header{
  min-height:0;
}

/* Profile header actions */
.profile-header-actions{
  display:flex;
  align-items:flex-start;
  gap:12px;
  flex:0 0 auto;
}

.profile-header-actions .profile-activity-button{
  margin-top:0;
}

.profile-header-actions .partner-badge{
  margin-top:2px;
}

@media(max-width:700px){
  .profile-header-actions{
    width:100%;
    justify-content:flex-start;
  }
}

\n\n/* CROWN UI — 2026-08-13 PROFILE + ACTIVITY PASS */

/* Remove the old page-level explanatory subtitle area. */
.page-heading > p:empty {
  display:none;
}

/* Realtor name must remain high-contrast on the blue profile hero. */
.profile-hero .profile-top h2 {
  color:#fff;
}

/* More separation between Realtor Intelligence and Crown Coach. */
.crown-coach-workspace {
  margin-top:38px;
}

/* ------------------------------------------------------------
   Activities: preserve natural column widths and scroll
   horizontally instead of squeezing the table.
   ------------------------------------------------------------ */
.activity-history-shell .worksheet-scroll {
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:auto;
  scrollbar-color:#9eacb8 #edf1f4;
}

.activity-history-shell .activity-history-table {
  width:max-content;
  min-width:1600px;
  table-layout:auto;
}

.activity-history-shell .activity-history-table th,
.activity-history-shell .activity-history-table td {
  white-space:nowrap;
  min-width:120px;
}

.activity-history-shell .activity-history-table th:first-child,
.activity-history-shell .activity-history-table td:first-child {
  min-width:180px;
}

.activity-history-shell .activity-history-table th:nth-child(2),
.activity-history-shell .activity-history-table td:nth-child(2) {
  min-width:180px;
}

.activity-history-shell .activity-history-table th:nth-child(3),
.activity-history-shell .activity-history-table td:nth-child(3) {
  min-width:180px;
}

.activity-history-shell .activity-history-table th:nth-child(4),
.activity-history-shell .activity-history-table td:nth-child(4) {
  min-width:130px;
}

.activity-history-shell .activity-history-table th:nth-child(5),
.activity-history-shell .activity-history-table td:nth-child(5) {
  min-width:150px;
}

.activity-history-shell .activity-history-table th:nth-child(6),
.activity-history-shell .activity-history-table td:nth-child(6) {
  min-width:90px;
}

.activity-history-shell .activity-history-table th:nth-child(7),
.activity-history-shell .activity-history-table td:nth-child(7) {
  min-width:320px;
}

.activity-history-shell .activity-history-table th:nth-child(8),
.activity-history-shell .activity-history-table td:nth-child(8) {
  min-width:150px;
}

.activity-history-shell .activity-history-table th:nth-child(9),
.activity-history-shell .activity-history-table td:nth-child(9) {
  min-width:120px;
}

@media(max-width:900px) {
  .crown-coach-workspace {
    margin-top:28px;
  }

  .activity-history-shell .activity-history-table {
    min-width:1400px;
  }
}

\n\n/* CROWN UI — 2026-08-13 COACH HEADER PASS V2 */

/* Give Realtor Intelligence and Crown Coach real visual separation. */
.coach-workspace-head {
  margin-top:56px !important;
}

/* Assignment title on the left, controls in the middle,
   relationship stage on the right. */
/* Assignment title on the left, controls centered,
   relationship stage on the right. */
.coach-workspace-head {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:24px;
}

.coach-workspace-head .coach-workspace-title {
  justify-self:start;
}

.coach-workspace-head .pill {
  justify-self:end;
}

.coach-workspace-title {
  flex:0 0 auto;
}

.coach-header-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
}

.coach-header-actions button {
  white-space:nowrap;
}

.coach-header-actions .pill {
  flex:0 0 auto;
  white-space:nowrap;
}

@media(max-width:1200px) {
  .coach-workspace-head {
    align-items:flex-start;
  }

  .coach-header-actions {
    justify-content:flex-end;
  }
}

@media(max-width:950px) {
  .coach-workspace-head {
    flex-direction:column;
    align-items:flex-start;
  }

  .coach-header-actions {
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
}

.coach-workspace-head > .secondary-button,
.coach-workspace-head > .primary-button {
  justify-self:center;
}


/* Live Mortgage Opportunity */
.live-opportunity-details {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.live-opportunity-details > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.live-opportunity-details > div:last-child {
  border-bottom: 0;
}

.live-opportunity-details span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .65;
}

.live-opportunity-details strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.live-opportunity-next-move {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(0,0,0,.035);
}

.live-opportunity-next-move .coach-field-label {
  display: block;
  margin-bottom: 6px;
}

.live-opportunity-next-move p {
  margin: 0;
  line-height: 1.5;
}

.live-opportunity-actions {
  margin-top: 16px;
}

/* ============================================================
   Crown Coach Guided V1
   ============================================================ */

.coach-guided-shell {
  margin-top: 18px;
}

.coach-guided-entry {
  max-width: 920px;
}

.coach-guided-heading {
  margin-bottom: 22px;
}

.coach-guided-heading h3 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

.coach-guided-heading p {
  margin: 0;
  color: #667085;
  font-size: 15px;
}

.coach-guided-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.coach-guided-button {
  width: 100%;
  min-height: 96px;
  padding: 18px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  white-space: normal;
}

.coach-guided-button strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.coach-guided-button span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  color: #667085;
}

.coach-guided-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .coach-guided-grid {
    grid-template-columns: 1fr;
  }

  .coach-guided-button {
    min-height: 82px;
  }
}


/* ============================================================
   REPORTS V2 — LO PERFORMANCE / MANAGEMENT VIEW
   ============================================================ */

.reports-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}

.reports-toolbar h2{
  margin:5px 0 6px;
  font-size:26px;
  letter-spacing:-.025em;
}

.reports-toolbar .coaching-note{
  max-width:720px;
  margin:0;
}

.reports-range-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.reports-range-tabs .secondary-button.active{
  border-color:#09283f;
  background:#09283f;
  color:#fff;
}

.reports-period-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin:22px 0 14px;
}

.reports-period-heading h3{
  margin:4px 0 0;
  font-size:24px;
  letter-spacing:-.02em;
}

.reports-metric-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.reports-metric-grid .metric-card{
  min-height:148px;
}

.reports-metric-grid .metric-card > span{
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}

.reports-metric-grid .metric-card strong{
  display:block;
  margin-top:13px;
  font-size:38px;
  line-height:1;
}

.reports-metric-grid .metric-card small{
  display:block;
  margin-top:11px;
  line-height:1.4;
  color:var(--muted);
}

.reports-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
  margin-top:20px;
}

.reports-execution-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}

.reports-execution-summary > div{
  display:grid;
  gap:5px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfcfd;
}

.reports-execution-summary strong{
  font-size:28px;
  line-height:1;
  color:var(--navy);
}

.reports-execution-summary span{
  font-size:11px;
  line-height:1.35;
  font-weight:800;
  color:var(--muted);
}

.reports-summary-copy{
  margin:18px 0 0;
  line-height:1.55;
  color:#536577;
}

.reports-current-book .card-heading{
  align-items:flex-start;
}

.reports-current-book .coaching-note{
  margin:10px 0 16px;
}

.reports-priority-list{
  display:grid;
  gap:8px;
}

.reports-priority-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:11px 13px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fbfcfd;
}

.reports-priority-row span{
  font-size:13px;
  font-weight:750;
}

.reports-priority-row strong{
  min-width:34px;
  text-align:right;
  font-size:18px;
  color:var(--navy);
}

@media(max-width:1080px){
  .reports-metric-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .reports-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .reports-toolbar,
  .reports-period-heading{
    align-items:flex-start;
    flex-direction:column;
  }

  .reports-range-tabs{
    justify-content:flex-start;
  }

  .reports-metric-grid,
  .reports-execution-summary{
    grid-template-columns:1fr;
  }
}

/* ============================================================
   CROWN WINS — PENDING WIN CANDIDATES
   ============================================================ */

.pending-win-card{
  position:relative;
  border:1px solid #dfc77f;
  background:
    linear-gradient(
      145deg,
      #fffdf8 0%,
      #fff9e9 100%
    );
}

.pending-win-card::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:5px;
  border-radius:14px 0 0 14px;
  background:var(--gold);
}

.pending-win-label{
  display:inline-flex;
  align-items:center;
  margin-bottom:10px;
  padding:5px 9px;
  border-radius:999px;
  background:var(--gold-soft);
  color:#765600;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.pending-win-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.pending-win-card h3{
  margin:9px 0 8px;
}

.pending-win-card > p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.pending-win-actions{
  display:flex;
  gap:8px;
  margin-top:16px;
  flex-wrap:wrap;
}

/* ============================================================
   TODAY'S ASSIGNMENT — SPACING POLISH
   ============================================================ */

.live-opportunity-card + .coach-workspace-head {
  margin-top: 28px;
}

/* ============================================================
   LIVE MORTGAGE OPPORTUNITY — ACTIVE HIGHLIGHT
   ============================================================ */

.live-opportunity-card {
  background:
    linear-gradient(
      135deg,
      #fffdf6 0%,
      #fff9e8 55%,
      #fffdf7 100%
    );

  border-color: #e4bd55;
  box-shadow:
    0 8px 24px rgba(120, 88, 12, 0.08);
}

.live-opportunity-card .live-opportunity-next-move {
  background: rgba(255, 244, 204, 0.55);
  border: 1px solid rgba(214, 168, 48, 0.28);
}

/* ============================================================
   CROWN OS — PRODUCTION AUTHENTICATION
   ============================================================ */

.crown-auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px;
  background:
    radial-gradient(
      circle at top right,
      rgba(198,164,77,.16),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      #0b2238 0%,
      #071827 100%
    );
}

.crown-auth-card{
  width:min(460px,100%);
  padding:38px;
  border:1px solid rgba(220,190,112,.45);
  border-radius:22px;
  background:#fff;
  box-shadow:
    0 24px 70px rgba(0,0,0,.25);
}

.crown-auth-brand{
  text-align:center;
  margin-bottom:28px;
}

.crown-auth-mark{
  font-size:34px;
  line-height:1;
  font-weight:800;
  letter-spacing:.12em;
  color:#10283d;
}

.crown-auth-brand .eyebrow{
  margin-top:8px;
  color:#a27b22;
}

.crown-auth-brand h1{
  margin:20px 0 10px;
  font-size:28px;
  color:#10283d;
}

.crown-auth-copy{
  margin:0;
  color:#617182;
  line-height:1.55;
}

.crown-auth-form{
  display:grid;
  gap:18px;
}

.crown-auth-form label{
  display:grid;
  gap:7px;
  font-weight:700;
  color:#21384d;
}

.crown-auth-form input{
  width:100%;
  min-height:46px;
}

.crown-auth-submit{
  width:100%;
  margin-top:4px;
}

.crown-auth-message{
  margin:0;
  padding:11px 13px;
  border-radius:10px;
  background:#fff1f0;
  color:#a13731;
  line-height:1.45;
}
