/* PHG SOLAR V3 — adaptação visual baseada no PHG Energy V8.1.
   Alterações limitadas à apresentação; dados e permissões permanecem no backend Solar. */
:root {
  color-scheme: light;
  --navy: #10263e;
  --navy-dark: #0d2340;
  --navy-2: #183954;
  --orange: #f47b20;
  --orange-dark: #dd6d12;
  --background: #f5f7fb;
  --white: #fff;
  --border: #e0e7ef;
  --text: #172c43;
  --muted: #70849a;
  --soft-shadow: 0 4px 18px #13304a08;
  font-family: Inter, 'Segoe UI', Arial, Helvetica, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { margin: 0; min-width: 300px; background: var(--background); color: var(--text); font-size: 13px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f7b36c; outline-offset: 2px;
}
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.23; }
.eyebrow { color: var(--orange-dark); font-weight: 850; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.sub { color: var(--muted); line-height: 1.6; font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; min-height: 39px; padding: 10px 15px; border: 1px solid transparent; font-weight: 750; font-size: 12px; line-height: 1.2; transition: background .18s, transform .18s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: white; background: var(--orange); border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-secondary, .btn-back { background: white; color: var(--navy-2); border-color: #d3dfeb; }
.btn-secondary:hover, .btn-back:hover { background: #eef4f8; }
.btn-back { margin: 0 0 17px; }
.tag { display: inline-flex; align-items: center; border-radius: 25px; padding: 6px 10px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.tag-blue { color: #285c87; background: #eaf3fa; }
.tag-amber { color: #946019; background: #fff0da; }

/* Tela de autenticação: mesma linguagem de alto contraste do Energy. */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 48%) minmax(350px, 52%); background: #fff; }
.login-hero { display: flex; flex-direction: column; padding: clamp(30px, 5vw, 78px); color: white;
  background: radial-gradient(circle at 82% 20%, #28547566 0, transparent 32%), linear-gradient(150deg, #0b1e33 0%, #102e4c 55%, #183d5f 100%); position: relative; overflow: hidden; }
.login-hero::after { content: ''; position: absolute; width: 440px; height: 440px; border: 1px solid #ffffff14; border-radius: 50%; right: -240px; bottom: -240px; box-shadow: 0 0 0 70px #ffffff08, 0 0 0 145px #ffffff04; pointer-events: none; }
.login-brand, .brand { display: flex; align-items: center; gap: 12px; }
.login-brand img { height: 51px; width: 51px; object-fit: contain; border-radius: 11px; background: white; padding: 5px; }
.login-brand strong, .brand strong { display: block; color: white; font-size: 22px; font-weight: 850; letter-spacing: .005em; }
.login-brand small, .brand small { display: block; color: #acc4d9; font-size: 9.5px; letter-spacing: .11em; margin-top: 3px; font-weight: 750; }
.login-intro { margin-top: auto; margin-bottom: auto; padding: 60px 0; max-width: 490px; position: relative; z-index: 1; }
.login-overline { display: inline-block; color: #ff9b4e; font-weight: 850; letter-spacing: .12em; font-size: 11px; margin-bottom: 17px; }
.login-intro h1 { font-size: clamp(33px, 3.9vw, 58px); font-weight: 800; line-height: 1.1; letter-spacing: -.04em; margin-bottom: 23px; }
.login-intro p { color: #bbccdb; font-size: 15px; line-height: 1.85; max-width: 390px; }
.login-pill { display: inline-block; margin-top: 31px; background: #f47b2020; color: #ffc99c; border: 1px solid #f47b206b; border-radius: 24px; padding: 11px 15px; font-size: 11px; font-weight: 750; }
.login-footnote { color: #9eb5ca; font-size: 11px; z-index: 1; }
.login-side { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px 30px; }
.login-panel { width: min(100%, 405px); }
.login-panel h2 { color: #142c46; margin: 12px 0 10px; font-weight: 800; font-size: 29px; letter-spacing: -.025em; }
.login-panel .sub { margin-bottom: 30px; }
.login-form { display: grid; gap: 17px; }
label { display: block; font-size: 11.5px; color: #4e647a; font-weight: 800; }
input, select, textarea { display: block; width: 100%; margin-top: 7px; border: 1px solid #d8e2ec; border-radius: 8px; background: #fff; color: #17324b; padding: 11px 12px; min-width: 0; outline-color: #f7b36c; }
input::placeholder, textarea::placeholder { color: #94a5b5; font-weight: 400; }
textarea { resize: vertical; min-height: 70px; }
.login-form input { height: 47px; background: #fbfcfe; }
.login-form .btn { width: 100%; height: 46px; margin-top: 9px; font-size: 13px; }
#login-error { color: #ac3c25; font-weight: 750; min-height: 16px; font-size: 12px; margin: 13px 0 0; }
.secure-note { padding-top: 21px; border-top: 1px solid #e9edf3; color: #8192a4; font-size: 11px; line-height: 1.6; margin-top: 24px; }
.login-footer { color: #8e9fb0; font-size: 10.5px; text-align: center; margin-top: 50px; }

/* Navegação lateral persistente, semelhante ao PHG Energy V8.1. */
#workspace { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 30; overflow-y: auto; background: var(--navy-dark); padding: 19px 13px; color: white; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #3b5875 transparent; }
.brand { padding: 10px 7px 29px; min-height: 81px; }
.brand img { width: 43px; height: 43px; object-fit: contain; border-radius: 9px; background: white; padding: 4px; flex: 0 0 auto; }
.brand strong { font-size: 18px; }
.brand small { font-size: 9.5px; }
.menu-caption { font-size: 9.5px; font-weight: 850; color: #7892aa; letter-spacing: .11em; padding: 7px 13px 10px; }
.menu-caption-inside { padding-top: 25px; }
.sidebar nav { display: grid; gap: 4px; }
.nav, .future { color: #d9e6f2; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 43px; border: 0; border-radius: 9px; text-align: left; font-weight: 700; font-size: 12.5px; padding: 10px 12px; background: none; }
.nav:hover { background: #28435c; color: white; }
.nav.active { background: var(--orange); color: white; box-shadow: 0 4px 13px #f47b203d; }
.nav-parent .menu-chevron { margin-left: auto; font-size: 17px; transform: rotate(0); transition: transform .16s; }
.nav-parent[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.submenu { margin: 0 0 5px 22px; padding: 3px 0 5px 8px; border-left: 2px solid #f47b20a0; display: grid; gap: 2px; background: #ffffff08; border-radius: 0 9px 9px 0; }
.subnav { min-height: 30px; border-radius: 5px; padding: 7px 9px; font-size: 11px; color: #bacbdb; }
.subnav.active { background: #ffffff16; color: #ffb777; box-shadow: none; }
.nav-icon { width: 21px; text-align: center; font-size: 17px; flex: 0 0 21px; color: inherit; }
.future { min-height: 40px; color: #a4b8ca; cursor: default; }
.future em { font-style: normal; border: 1px solid #415b73; border-radius: 5px; font-size: 9px; color: #9cb3c8; padding: 3px 5px; margin-left: auto; white-space: nowrap; }
.aside-foot { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 19px 5px 8px; border-top: 1px solid #35506a; }
.sidebar-user-avatar, .topbar-avatar { width: 36px; height: 36px; border-radius: 10px; background: #eaf3fc; color: #234967; font-size: 11px; font-weight: 900; display: grid; place-items: center; flex: 0 0 auto; }
.sidebar-user-avatar { background: #32536f; color: white; }
.sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user-text strong, .sidebar-user-text small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user-text strong { font-size: 11.5px; }
.sidebar-user-text small { margin-top: 4px; color: #a8bfd3; font-size: 10px; }
#logout { border: 0; background: #ffffff13; border-radius: 8px; font-size: 21px; color: #dce8f3; width: 32px; height: 32px; }
#logout:hover { background: #ffffff29; }
.app-shell { margin-left: 252px; min-height: 100vh; }
.topbar { height: 72px; background: white; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 29px; }
.topbar-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-kicker { font-size: 9px; color: #a2b0bf; font-weight: 850; letter-spacing: .11em; }
.topbar h1 { font-size: 18px; color: #203953; font-weight: 800; margin: 3px 0 0; }
.topbar-actions { display: flex; gap: 20px; align-items: center; }
.global-search-label { display: flex; align-items: center; background: #f5f7fa; border: 1px solid #e5eaf0; border-radius: 8px; width: 260px; padding-left: 11px; color: #7690a9; font-size: 22px; font-weight: 500; }
.global-search-label input { margin: 0; border: 0; outline: 0; background: transparent; padding: 11px; width: 100%; font-size: 11.5px; font-weight: 500; }
.global-search-label:focus-within { border-color: #f7b36c; }
.topbar-account { display: flex; align-items: center; gap: 11px; padding-left: 17px; border-left: 1px solid #e6edf4; }
.topbar-account strong, .topbar-account small { display: block; text-align: right; white-space: nowrap; }
.topbar-account strong { color: #244058; font-size: 11.5px; }
.topbar-account small { color: #8194a7; font-size: 10px; margin-top: 3px; }
.mobile-menu { display: none; border: 1px solid #dde6ef; background: #fff; padding: 6px 10px; border-radius: 7px; font-size: 20px; color: #2b4a62; }

/* Estrutura de páginas e componentes reutilizados. */
.content { max-width: 1620px; padding: 27px 29px 50px; margin: 0 auto; }
body.solar-active .content { max-width: none; padding: 18px 18px 42px; }
.solar-workspace { width:100%; max-width:100%; min-width:0; }
.solar-workspace .page-heading { margin-bottom:12px; }
.solar-toolbar { border:1px solid #dce5ed; background:#fff; padding:14px 18px; border-radius:12px; margin:0 0 12px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.solar-toolbar>label { flex:0 1 245px; }
.solar-toolbar .sub { margin:3px 0; }
.solar-toolbar #solar-sync-status { flex-basis:100%; }
.solar-combobox { flex:1 1 340px; position:relative; }
.solar-combobox input { display:block; width:100%; min-height:43px; padding:10px 13px; border:1px solid #bdcedc; border-radius:8px; font:inherit; box-sizing:border-box; }
.solar-seller-select { flex:1 1 270px; min-height:43px; border:1px solid #bdcedc; border-radius:8px; padding:10px; background:white; }
#solar-client-results { position:absolute; z-index:100; top:calc(100% + 3px); left:0; right:0; border:1px solid #c3d2dd; border-radius:9px; background:white; box-shadow:0 12px 27px #15345226; max-height:310px; overflow-y:auto; }
#solar-client-results[hidden] { display:none; }
.solar-result { border:0; border-bottom:1px solid #eef1f4; padding:11px 13px; width:100%; background:white; text-align:left; cursor:pointer; display:grid; gap:2px; }
.solar-result:hover,.solar-result:focus-visible { background:#fff1e4; }
.solar-result small { color:#647b8c; }
.solar-frame { display:block; width:100%; min-height:750px; border:0; background:white; border-radius:10px; overflow:hidden; }
.profile-trigger { border:0; cursor:pointer; font:inherit; }
.profile-trigger:hover { outline:2px solid var(--orange); outline-offset:2px; }
.profile-dialog { width:min(480px,calc(100vw - 30px)); max-height:85vh; border:1px solid #dce6ee; border-radius:15px; padding:24px; color:#18334c; box-shadow:0 20px 70px #07172955; }
.profile-dialog::backdrop { background:#07172999; }
.profile-dialog h2 { margin:4px 0 16px; }
.profile-close { position:absolute; right:16px; top:12px; border:0; background:none; font-size:22px; cursor:pointer; }
.profile-photo-preview { width:100px; height:100px; border-radius:50%; background:#dae6f2; color:#18334c; display:grid; place-items:center; font-size:29px; font-weight:800; margin-bottom:14px; }
.profile-upload { display:inline-flex; margin:16px 0 5px; cursor:pointer; }
.profile-phone-label { display:block; margin:14px 0 6px; font-size:12px; font-weight:700; }
.profile-phone-row { display:flex; gap:7px; margin:0 0 18px; }
.profile-phone-row input { flex:1; min-width:0; border:1px solid #c6d7e2; border-radius:8px; padding:10px; }
.profile-dialog input[type=search] { width:100%; padding:11px; margin-bottom:14px; border:1px solid #c6d7e2; border-radius:8px; }
.messages-layout { display:grid; grid-template-columns:minmax(240px,310px) minmax(0,1fr); gap:15px; min-height:570px; }
.messages-side,.messages-main { padding:0; min-width:0; overflow:hidden; }
.messages-side-heading,.messages-chat-heading { min-height:70px; padding:16px; display:flex; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid #e5edf3; }
.messages-chat-heading { display:grid; align-content:center; gap:4px; }
.messages-chat-heading small { color:#718295; }
.messages-chats { display:grid; align-content:start; max-height:650px; overflow:auto; }
.messages-chat { display:grid; gap:4px; position:relative; text-align:left; border:0; border-bottom:1px solid #edf2f6; background:white; padding:14px 17px; cursor:pointer; }
.messages-chat.is-active,.messages-chat:hover { background:#fff3e9; }
.messages-chat small { color:#688094; }
.messages-count,.message-badge { border-radius:99px; background:#f47b20; color:white; font-size:11px; padding:2px 7px; font-style:normal; }
.messages-count { position:absolute; right:12px; top:12px; }
.message-badge { margin-left:auto; }
.messages-history { background:#f5f8fb; height:470px; overflow-y:auto; padding:15px; display:flex; flex-direction:column; gap:11px; }
.message-bubble { max-width:80%; align-self:flex-start; border-radius:12px 12px 12px 3px; background:white; border:1px solid #e1eaf1; padding:10px 13px; box-shadow:0 2px 5px #142e4b0d; overflow-wrap:anywhere; }
.message-bubble.own { align-self:flex-end; border-radius:12px 12px 3px 12px; background:#fff0e2; border-color:#ffdfc6; }
.message-author { font-size:12px; color:#1b405e; }
.message-body { white-space:pre-wrap; font-size:13px; line-height:1.55; margin:6px 0; }
.message-file { font-size:12px; display:block; margin:8px 0; color:#145b9b; text-decoration:underline; }
.message-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#627d91; font-size:11px; }
.message-meta button { background:transparent; border:0; color:#1a607e; font-size:11px; cursor:pointer; text-decoration:underline; }
.messages-compose { padding:13px; border-top:1px solid #e5edf3; }
.messages-compose textarea { width:100%; padding:11px 12px; border:1px solid #cedbe5; border-radius:9px; resize:vertical; box-sizing:border-box; font:inherit; }
.messages-compose-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; }
.messages-compose-controls label.btn { cursor:pointer; }
.messages-compose-controls .btn { font-size:11px; padding:9px 10px; }
.messages-compose-controls .btn-primary { margin-left:auto; }
.messages-ack { display:flex; align-items:center; gap:6px; font-size:12px; }
.messages-recipients { max-height:360px; overflow:auto; display:grid; gap:4px; }
.messages-recipient { background:#f5f8fb; padding:12px; text-align:left; border:1px solid #e3eaf0; border-radius:8px; cursor:pointer; }
.messages-recipient:hover { background:#fff1e4; }
.messages-receipt { padding:10px 0; display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid #e5ecf2; }
.messages-receipt small { color:#5c778c; }
@media(max-width:800px){.messages-layout{grid-template-columns:1fr}.messages-chats{max-height:220px}.messages-history{height:380px}.messages-side-heading,.messages-chat-heading{min-height:55px}.message-bubble{max-width:95%}}
.view { animation: phg-enter .18s ease-out; }
@keyframes phg-enter { from { opacity: .85; transform: translateY(3px); } to { opacity: 1; transform: none; } }
#notice:empty { display: none; }
#notice:not(:empty) { background: #eaf6ec; color: #286c43; border-left: 4px solid #51a771; border-radius: 8px; padding: 11px 14px; margin-bottom: 17px; font-weight: 750; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 2px 0 22px; }
.page-heading h2 { font-size: 25px; color: #142c46; letter-spacing: -.025em; margin: 7px 0 5px; }
.page-heading .sub { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0 22px; }
.stat-card, .card { background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--soft-shadow); }
.stat-card { min-width: 0; padding: 21px 19px; }
.stat-card small { color: #687d91; font-weight: 750; display: block; font-size: 11.5px; line-height: 1.5; }
.stat-card strong { font-size: clamp(24px, 2.5vw, 32px); font-weight: 850; letter-spacing: -.04em; display: block; margin: 7px 0 4px; color: #142d47; font-variant-numeric: tabular-nums; }
.stat-card.emphasis strong { color: var(--orange-dark); }
.stat-card span { color: #6c8297; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr); gap: 17px; margin-bottom: 18px; }
.panel { min-width: 0; padding: 22px; margin-bottom: 19px; }
.panel-head { display: flex; gap: 12px; justify-content: space-between; align-items: start; margin-bottom: 19px; }
.panel h3, .detail-grid h3 { color: #17324c; font-size: 16.5px; font-weight: 850; margin: 0 0 5px; }
.panel-head p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 11.5px; }
.mini-icon { display: grid; place-items: center; background: #fff0e3; color: #d46c16; border-radius: 9px; font-size: 22px; width: 37px; height: 37px; flex: 0 0 auto; }
.funnel-bars { display: grid; gap: 15px; padding-top: 3px; }
.funnel-row { display: flex; align-items: center; gap: 12px; font-size: 11.5px; }
.funnel-label { flex: 0 0 130px; color: #4f657a; font-weight: 700; }
.funnel-track { flex: 1; background: #eef1f5; border-radius: 9px; height: 11px; overflow: hidden; }
.funnel-fill { display: block; height: 100%; background: #244c74; border-radius: inherit; min-width: 0; }
.funnel-row:nth-child(even) .funnel-fill { background: var(--orange); }
.funnel-count { min-width: 27px; font-weight: 800; text-align: right; color: #17324c; }
.empty-state { font-size: 12px; color: #8a9bad; background: #f7f9fb; border: 1px dashed #dbe5ef; padding: 18px; text-align: center; border-radius: 8px; line-height: 1.65; }
.reminders, .alert-list, .history-list { display: grid; gap: 0; }
.reminder-item, .alert-item { padding: 12px 0; border-bottom: 1px solid #e9eef3; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.reminder-item:last-child, .alert-item:last-child { border-bottom: 0; }
.reminder-item strong, .alert-item strong { color: #203a53; font-size: 11.5px; display: block; }
.reminder-item small, .alert-item small { display: block; margin-top: 4px; font-size: 10.5px; color: #71859b; }
.reminder-dot { color: #d46c16; background: #fff1e4; border-radius: 50%; width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; }
.reminder-text { flex: 1; min-width: 0; }
.alert-item button { color: #b85e18; background: #fff8f1; border: 1px solid #edba92; border-radius: 7px; font-size: 11px; padding: 7px 10px; font-weight: 750; }
.info-banner { background: #fff8ed; border: 1px solid #f0d6b4; border-left: 4px solid var(--orange); border-radius: 9px; padding: 12px 15px; color: #755635; font-size: 11.5px; line-height: 1.6; margin: 14px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 19px; }
.form-grid .wide, .form-grid .actions { grid-column: 1 / -1; }
.form-grid .actions { display: flex; justify-content: flex-end; padding-top: 3px; }
.list-toolbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; border-radius: 9px; background: #f8fafc; margin-bottom: 17px; }
.compact-field { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.compact-field input, .compact-field select { width: 210px; margin: 0; padding: 9px 11px; background: white; }
.counter { font-size: 10px; font-weight: 750; border-radius: 20px; padding: 4px 8px; color: #54748e; background: #eaf2f8; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; min-width: 600px; }
th { background: #f4f7fa; color: #70839a; font-size: 10px; text-transform: uppercase; letter-spacing: .055em; }
th, td { padding: 13px; border-bottom: 1px solid #e5ebf1; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 800; color: #18354f; }
td button { border: 0; background: transparent; color: #d36c1a; font-weight: 800; padding: 5px; white-space: nowrap; }
td button:hover { text-decoration: underline; }
.stage-badge { border-radius: 20px; padding: 5px 9px; font-weight: 800; display: inline-block; background: #eaf3fa; color: #285c87; font-size: 10.5px; white-space: nowrap; }
.stage-badge.won { background: #e2f5ea; color: #0b7850; }
.stage-badge.lost { background: #fff0da; color: #946019; }
.stage-badge.pending { background: #fff0e4; color: #aa631f; }
.detail-hero { padding: 25px; }
.detail-hero h2 { font-size: 24px; color: #142c46; margin: 7px 0; }
.detail-hero .sub { margin-bottom: 7px; }
.detail-location { display: inline-flex; gap: 7px; align-items: center; color: #607c93; font-size: 12px; margin: 0 0 25px; }
.detail-location>span:first-child { color: var(--orange); font-size: 20px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mini-form { display: flex; flex-direction: column; gap: 12px; padding: 21px; border-radius: 12px; border: 1px solid #e5ebf1; background: #fafbfd; min-width: 0; }
.mini-form h3 { margin-bottom: 6px; }
.mini-form label { color: #546b81; }
.mini-form input, .mini-form select, .mini-form textarea { background: white; }
.mini-form .btn { margin-top: auto; }
.transfer-panel { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin-top: 19px; background: #fff8ef; border: 1px solid #f4dac0; border-radius: 11px; padding: 16px; }
.transfer-panel>div { margin-right: auto; }
.transfer-panel strong { display: block; font-size: 12px; color: #5a422d; }
.transfer-panel p { font-size: 11px; color: #927351; margin: 5px 0 0; }
.transfer-panel select { width: 210px; margin: 0; }
.history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 19px; }
.history-item { padding: 13px 0 13px 15px; border-left: 3px solid #e6ecf3; border-bottom: 1px solid #edf1f5; margin-left: 3px; }
.history-item:last-child { border-bottom: 0; }
.history-item strong { display: block; color: #223d56; font-size: 11.5px; line-height: 1.5; }
.history-item small { display: block; margin-top: 5px; color: #8496a9; line-height: 1.5; font-size: 10.5px; }
.history-item button { margin-top: 9px; padding: 7px 10px; border: 1px solid #e2c09d; color: #ab681e; background: #fff7ee; border-radius: 7px; font-size: 11px; font-weight: 750; }
.disclaimer { font-size: 10.5px; color: #8a9bac; line-height: 1.55; padding-top: 19px; }
.energy-crm-heading { margin-bottom: 13px; }
.crm-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid #e0e7ef; margin: 0 0 17px; }
.crm-tab { border: 0; background: transparent; font-weight: 800; color: #425971; padding: 11px 7px 13px; border-bottom: 2px solid transparent; font-size: 11.5px; }
.crm-tab.active { color: #e87618; border-bottom-color: #f47b20; }
.crm-stats { margin-top: 17px; }
.crm-stats .stat-card { min-height: 104px; }
.crm-stats .stat-card strong { font-size: 27px; }
.kanban-board { display: grid; grid-template-columns: repeat(6,minmax(170px,1fr)); gap: 10px; overflow-x: auto; padding-bottom: 15px; margin-bottom: 14px; }
.kanban-column { border: 1px solid #e0e7ef; border-top: 3px solid var(--column-color); border-radius: 10px; overflow: hidden; min-height: 300px; background: #f0f4f8; }
.kanban-column-head { padding: 14px 10px; display: flex; justify-content: space-between; align-items: center; gap: 7px; background: #fff; font-size: 11px; }
.kanban-column-head strong { color: #203950; }
.kanban-count { background: #e8eef3; padding: 5px 8px; border-radius: 40px; color: #4e6376; font-size: 10px; font-weight: 800; }
.kanban-column-body { padding: 9px; display: grid; align-content: start; gap: 8px; }
.kanban-empty { font-size: 10px; text-align: center; color: #8596a7; margin-top: 20px; }
.kanban-card { text-align: left; width: 100%; border: 1px solid #e3eaf2; background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 2px 5px #12304a0a; }
.kanban-card:hover { border-color: var(--orange); }
.kanban-card strong, .kanban-card small { display: block; overflow-wrap: anywhere; }
.kanban-card strong { font-size: 11px; color: #263f58; }
.kanban-card small { font-size: 10px; color: #8093a6; margin-top: 7px; }
.pipeline-entry { display: flex; gap: 15px; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #e6edf4; }
.pipeline-entry:last-child { border: 0; }
.documents-panel { margin-top: 20px; border: 1px solid #e2e9f1; border-radius: 12px; background: #fafcfe; padding: 18px; }
.documents-panel h3 { margin: 0 0 6px; color: #17324c; font-size: 16px; }
.documents-panel .panel-head p { color: #70849a; }
.document-upload-form { display: grid; align-items: end; grid-template-columns: minmax(155px, .7fr) minmax(220px, 1.5fr) auto; gap: 12px; }
.document-upload-form input { background: #fff; }
.document-list { padding-top: 14px; }
.document-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e4ebf2; padding: 10px 2px; }
.document-item strong, .document-item small { display: block; overflow-wrap: anywhere; }
.document-item strong { color: #17324c; font-size: 11px; }
.document-item small { color: #8a9bad; margin-top: 4px; }
.document-guidance { color: #7b674c; background: #fff7e8; border-radius: 8px; padding: 12px; margin: 12px 0 0; line-height: 1.6; font-size: 11px; }
.pipeline-entry strong, .pipeline-entry small { display: block; }
.pipeline-entry small { color: #8195a8; margin-top: 4px; }

@media (max-width: 1250px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid .mini-form:last-child { grid-column: 1 / -1; }
  .global-search-label { width: 210px; }
}
@media (max-width: 900px) {
  .sidebar { width: 252px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; border: 0; background: #071b31a8; z-index: 29; }
  .app-shell { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 19px; }
  .content { padding: 22px 19px 42px; }
  .login-screen { grid-template-columns: 44% 56%; }
  .login-hero { padding: 32px; }
}
@media (max-width: 680px) {
  .document-upload-form { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: repeat(6,minmax(195px,1fr)); }
  .login-screen { display: block; min-height: 100vh; }
  .login-hero { padding: 23px 26px 28px; }
  .login-intro { padding: 30px 0 0; }
  .login-intro h1 { font-size: 28px; margin-bottom: 10px; }
  .login-intro p { font-size: 12.5px; margin: 0; }
  .login-pill, .login-footnote { display: none; }
  .login-side { padding: 34px 25px 20px; }
  .login-panel h2 { font-size: 25px; }
  .login-footer { margin-top: 20px; }
  .topbar-account { display: none; }
  .global-search-label { width: min(44vw, 200px); }
  .topbar-kicker { display: none; }
  .content { padding: 20px 14px 38px; }
  .page-heading { align-items: start; flex-direction: column; gap: 13px; }
  .page-heading h2 { font-size: 22px; }
  .stats { gap: 10px; }
  .stat-card { padding: 16px; }
  .panel { padding: 16px; }
  .form-grid, .detail-grid, .history-grid { grid-template-columns: 1fr; }
  .detail-grid .mini-form:last-child { grid-column: auto; }
  .detail-hero { padding: 17px; }
  .compact-field { width: 100%; }
  .compact-field input, .compact-field select { width: 100%; flex: 1; }
  .transfer-panel { align-items: stretch; }
  .transfer-panel>div, .transfer-panel select { width: 100%; }
  .funnel-label { flex-basis: 106px; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .global-search-label { width: 120px; }
  .topbar { gap: 7px; }
}
.document-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ocr-review{margin:18px 0;padding:20px;border:1px solid #f4b983;border-radius:14px;background:#fffaf4}
.ocr-review h4{margin:0 0 8px;color:#102846;font-size:18px}
.ocr-review p{color:#795329;margin:0 0 15px}
.ocr-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-bottom:16px}
.ocr-fields label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#304d6e}
.ocr-fields input{width:100%;border:1px solid #cbd9e7;border-radius:8px;padding:12px;font:inherit}
.ocr-check{display:flex;gap:9px;align-items:flex-start;margin:8px 0 18px;color:#304d6e}
.pre-doc-section{border:1px solid #d6e2ed;border-radius:14px;background:#f8fbff;padding:18px}
.pre-doc-section h4{margin:0 0 5px;color:#102846;font-size:18px}
.pre-doc-section h4 small{font-size:11px;background:#e5f0f9;color:#23577f;border-radius:12px;padding:4px 8px;margin-left:8px}
.pre-doc-section p{color:#5b7390;margin:4px 0 14px}
.pre-doc-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:14px}
.pre-doc-controls>label:first-child{flex:1 1 180px}
.pre-doc-file{display:flex;align-items:center;justify-content:center;padding:12px 16px;border:1px solid #cfdae8;border-radius:10px;background:white;color:#102846;font-weight:700;cursor:pointer}
.pre-doc-file input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
#pre-doc-ocr{margin-top:16px;padding:16px;background:white;border:1px solid #fed3aa;border-radius:12px}
.client-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 18px;border-bottom:1px solid #dbe5ef;padding-bottom:12px}
.client-tab{border:1px solid #d8e3ef;background:#f4f8fc;color:#294968;border-radius:10px;padding:11px 17px;font:inherit;font-weight:700;cursor:pointer}
.client-tab.active{background:#ea6b2d;color:white;border-color:#ea6b2d}
.client-tab-panel{margin:14px 0 24px}
.client-tab-panel[hidden],#edit-client-form[hidden],#client-personal-summary[hidden]{display:none!important}
.client-data-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:12px;margin:15px 0 22px}
.client-data-item{border:1px solid #e1e9f2;border-radius:12px;background:#f8fbff;padding:14px;min-width:0}
.client-data-item small{display:block;color:#627b94;font-size:12px;margin-bottom:6px;font-weight:700}
.client-data-item strong{color:#143453;overflow-wrap:anywhere;font-size:14px}
#edit-client-form{border-top:1px solid #e1e9f2;padding-top:22px}
.team-create-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-top:18px;align-items:end}
.team-create-form label{display:grid;gap:6px;font-weight:700;font-size:.9rem;color:#304c68}
.team-create-form input,.team-create-form select,.team-member input{width:100%;padding:11px;border:1px solid #d1dce9;border-radius:10px;background:white;color:#203851}
.team-member{display:grid;grid-template-columns:minmax(170px,2fr) minmax(150px,1.5fr) auto auto;gap:12px;align-items:center}
.message-body.deleted-message{font-style:italic;color:#667a90}
@media(max-width:700px){.team-member{grid-template-columns:1fr 1fr}.team-member small{grid-column:1}.team-member button{grid-column:2}}
.quick-start{background:linear-gradient(125deg,#102c4a,#174d70);color:white;border-radius:22px;padding:26px;margin-bottom:24px;box-shadow:0 14px 35px #10345225}
.quick-start-heading .eyebrow{color:#ffb879}.quick-start-heading h2{font-size:clamp(22px,2.6vw,30px);margin:7px 0}.quick-start-heading p{color:#d3e3f0;margin:0 0 22px}
.quick-start-status{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.connection-indicator{color:#ddffef;background:#ffffff20;border-radius:99px;padding:7px 11px;font-size:12px;font-weight:700}.connection-indicator.is-offline{color:#ffe8d2;background:#a94a284d}
.quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.quick-action{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;min-height:128px;padding:17px;border:1px solid #ffffff3b;background:#ffffff16;color:white;border-radius:15px;font:inherit;cursor:pointer;transition:background .2s,transform .2s}
.quick-action:hover{background:#ffffff2b;transform:translateY(-2px)}.quick-action strong{font-size:16px}.quick-action small{font-size:13px;color:#e1ebf5}.quick-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#ee762b;color:white;font-size:21px;margin-bottom:5px}
.mobile-dock{display:none}
@media(max-width:900px){.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-start{padding:20px}.quick-action{min-height:116px}.content{padding-bottom:110px!important}.mobile-dock{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;z-index:80;background:#fff;border-top:1px solid #dae4ed;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom));box-shadow:0 -8px 28px #12304c18}.mobile-dock button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:none;border:0;color:#294965;font:600 11px system-ui,sans-serif;min-height:48px;cursor:pointer}.mobile-dock button span{font-size:24px;line-height:1;color:#e8752d}.mobile-dock button:focus-visible,.quick-action:focus-visible{outline:3px solid #ffad65;outline-offset:2px}}
.mobile-dock button.active{color:#d76520;background:#fff4ec;border-radius:12px}
.client-create-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:12px 0 20px;padding:14px 18px;border:1px solid #d6e6f3;border-radius:13px;background:#f3f9ff;color:#274967}
.client-create-intro p{margin:0;font-size:14px;line-height:1.45}
#crm-form.crm-form-compact>label:not([data-quick]),#crm-form.crm-form-compact>.pre-doc-section,#crm-form.crm-form-compact>.info-banner{display:none!important}
#crm-form.crm-form-compact>.actions{grid-column:1/-1}
@media(max-width:680px){.client-create-intro{align-items:stretch;flex-direction:column}.client-create-intro button{width:100%}}
.service-cancel-dialog{width:min(94vw,560px);max-height:90vh;overflow:auto;border:1px solid #dce5ee;border-radius:20px;padding:28px;background:#fff;box-shadow:0 25px 80px #0b294455;color:#153452}
.service-cancel-dialog::backdrop{background:#081c35a6}
.service-cancel-dialog h2{margin:0 0 8px;font-size:23px}
.service-cancel-dialog label{display:grid;gap:8px;margin:17px 0;font-size:14px;font-weight:700}
.service-cancel-dialog select,.service-cancel-dialog textarea{box-sizing:border-box;width:100%;font:inherit;font-weight:400;border:1px solid #c8d8e6;border-radius:10px;padding:12px;color:#163b5b;background:white}
.cancel-service-warning{padding:12px 15px;border-radius:12px;background:#fff5e9;border:1px solid #f4d2aa;color:#7c481c;font-size:13px;line-height:1.5}
.cancel-service-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}
@media(max-width:600px){.service-cancel-dialog{padding:20px}.cancel-service-actions .btn{flex:1}}
@media(max-width:390px){.quick-actions{gap:8px}.quick-action{padding:12px}.quick-action strong{font-size:14px}.quick-action small{font-size:11px}}
