/* HiDEAL V35 — consistent theme across inner, service, CRUD and chat screens. */
:root { --hd35-primary:var(--primary,#1668D2); --hd35-border:var(--hd-border,#d4e3f2); --hd35-soft:var(--hd-soft,#eff6ff); }
html, body { accent-color:var(--primary,#1668D2); }
body.hd03-inner-page .hd-inner-breadcrumb,
body.hd03-inner-page .hideal-admin-toolbar-v23 a:not(.back):not(.dashboard),
.hideal-nav-btn, .workflow-nav-button {background-color:var(--primary,#1668D2)!important;border-color:var(--primary,#1668D2)!important;color:#fff!important;}
body.hd03-inner-page #hidealRouteContent .boxmiddle,
body.hd03-inner-page .container-main,
.services-wrap,.service-item,.sidebar-box,.agent-card,.hideal-nav-actions,.hideal-richtext,
.hideal-upload-preview {border-color:var(--hd-border,#d4e3f2)!important;}
.services-wrap {background:var(--hd-soft,#eff6ff)!important;}
.service-item:hover {background:var(--primary,#1668D2)!important;color:#fff!important;}
.service-sublist li::before {color:var(--primary,#1668D2)!important;}
.service-item:hover .service-sublist li::before {color:#fff!important;}
/* Property profile button has an inline gradient and inline hover handlers. */
body.hd03-inner-page .agent-card .agent-action-row > button:first-child,
body.hd03-inner-page .agent-card .agent-action-row > button[onclick*="openPublicProfile"],
body.hd03-inner-page .agent-round-btn:hover {background:var(--primary,#1668D2)!important;border-color:var(--primary,#1668D2)!important;color:#fff!important;}
body.hd03-inner-page .agent-img {border-color:var(--primary,#1668D2)!important;}
body.hd03-inner-page .agent-card svg.bi-person-circle {fill:var(--primary,#1668D2)!important;}
body.hd03-inner-page .agent-card div[style*="border:3px solid #00AAFF"] {border-color:var(--primary,#1668D2)!important;}
body.hd03-inner-page .agent-card div[style*="color:#00AAFF"] {color:var(--primary,#1668D2)!important;}
/* Existing chat UI: only change presentation; leave messaging API and auth untouched. */
#chatBoxContainer {--chat-primary:var(--primary,#1668D2);--chat-accent:var(--primary,#1668D2);--chat-border:var(--hd-border,#d4e3f2);}
#chatBoxContainer .chat-header, #chatBoxContainer .chat-top, #chatBoxContainer .chat-send,
#chatBoxContainer button[type="submit"],#chatBoxContainer .chat-active,
#chatBoxContainer .active-chat {background-color:var(--primary,#1668D2)!important;border-color:var(--primary,#1668D2)!important;}
#chatBoxContainer .chat-sidebar, #chatBoxContainer .chat-message-area {border-color:var(--hd-border,#d4e3f2)!important;}
/* Data list and management screens: keep full width. */
.hideal-viewdata-shell,.hideal-nav-actions,.hideal-admin-toolbar-v23 {max-width:none;}
.hideal-richtext:focus-within, input:focus-visible, select:focus-visible, textarea:focus-visible {outline-color:var(--primary,#1668D2);}
.hideal-richtext {border-color:var(--hd-border,#d4e3f2)!important;}
.progress-fill,.step.active .circle {background:var(--primary,#1668D2)!important;}
/* User request: form surface occupies 70% width, with 15% margins on desktop. */
@media (min-width:1000px) {
  body.hd03-inner-page .hideal-form-v35,
  body.hd03-inner-page #hidealRouteContent:has(form[action*='forms.php']) > .boxmiddle,
  body.hd03-inner-page #hidealRouteContent:has(form[action*='forms2.php']) > .boxmiddle,
  body.hd03-inner-page #hidealRouteContent > .boxmiddle:has(form[action*='insertdata']),
  body.hd03-inner-page #hidealRouteContent > .boxmiddle:has(.hideal-richtext) {
     width:70%!important; max-width:none!important; margin-left:15%!important; margin-right:15%!important;
     float:none!important; box-sizing:border-box!important;
  }
  body.hd03-inner-page #hidealRouteContent form {box-sizing:border-box!important;}
  /* City edit: its active form is not always under a dedicated wrapper. */
  body.hd03-inner-page .hideal-cityedit-shell {width:70%!important;max-width:none!important;margin-left:15%!important;margin-right:15%!important;}
}
@media (max-width:999px){.hideal-form-v35,body.hd03-inner-page .hideal-cityedit-shell{width:100%!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;}}

/* Chat uses these real class names (scriptchat.php). */
#chatBoxContainer.chat-container{border-color:var(--primary,#1668D2)!important}
#chatBoxContainer .chat-header,#chatBoxContainer .chat-property-btn button,
#chatBoxContainer .prop-btn button,#chatBoxContainer .send-btn,
#chatBoxContainer .chat-avatar-icon{background:var(--primary,#1668D2)!important;color:#fff!important}
#chatBoxContainer .msg.me{background:var(--hd-soft,#dbeeff)!important;border:1px solid var(--hd-border,#acd7f5)!important}
#chatBoxContainer .prop-price{color:var(--primary,#1668D2)!important}
#chatBoxContainer .chat-sidebar{border-right-color:var(--hd-border,#acd7f5)!important}
