/* HAVAL LAWYER — independent logo studio, white-first, navy/gold unchanged */
html[data-hv-custom-symbol="1"] #portalView .client-welcome:after,
html[data-hv-custom-symbol="1"] .client-welcome:after,
html[data-hv-custom-symbol="1"] .login-brand:before,
html[data-hv-custom-symbol="1"] .login-v3:after {
 background-image:var(--hv-managed-brand-symbol)!important;
}
.hv-logo-dialog {
 width:min(960px,calc(100vw - 26px));max-width:none;max-height:calc(100dvh - 24px);
 margin:auto;padding:0;border:1px solid #DCE3EB;border-radius:19px;
 color:#0B1F33;background:#FFF;box-shadow:0 24px 80px rgba(8,28,48,.24);
 font-family:Inter,"Noto Sans Arabic",Tahoma,sans-serif;line-height:1.65;
}
.hv-logo-dialog::backdrop{background:rgba(8,24,43,.65);backdrop-filter:blur(4px)}
.hv-logo-dialog .hv-logo-shell{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);min-height:0}
.hv-logo-head{padding:22px 26px;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid #E5EAF0}
.hv-logo-head span{color:#A77938;font-size:10px;font-weight:800;letter-spacing:.1em}
.hv-logo-head h2{font-size:25px;font-weight:850;color:#0B1F33;margin:4px 0}
.hv-logo-head p{color:#6F7E8C;font-size:12px;margin:0}
.hv-logo-close{background:#F6F8FA!important;border:1px solid #DBE2EA!important;color:#0B1F33!important;border-radius:10px;width:40px;height:40px;flex:none;font-size:24px;cursor:pointer}
.hv-logo-body{flex:1;overflow-y:auto;padding:19px 26px;min-height:0;display:flex;flex-direction:column;gap:16px}
.hv-logo-notice{display:flex;flex-direction:column;gap:4px;border:1px solid #EADCC4;background:#FEFBF7;padding:12px 16px;border-radius:12px}
.hv-logo-notice b{color:#3C4C59;font-size:13px}
.hv-logo-notice p{color:#74808B;font-size:11px;margin:0}
.hv-logo-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hv-logo-type{border:1px solid #DCE4EB;border-radius:15px;padding:15px;min-width:0;background:#FFF}
.hv-logo-type-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.hv-logo-kicker{color:#B68A45;font-size:11px;font-weight:850}
.hv-logo-type-head h3{margin:2px 0;font-size:16px;color:#0B1F33;font-weight:850}
.hv-logo-type-head p{font-size:10px;color:#6D7E8E;margin:0}
.hv-logo-kind-status{font-size:10px;white-space:nowrap;padding:4px 7px;border-radius:6px;background:#F3F5F7;color:#566C80}
.hv-logo-compare{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0 15px}
.hv-logo-preview{min-width:0}
.hv-logo-preview>b{display:block;font-size:10px;color:#5C6E80;margin-bottom:7px}
.hv-logo-preview-box{height:145px;border:1px solid #E1E6ED;border-radius:9px;padding:12px;display:grid;place-items:center;overflow:hidden}
.hv-logo-preview-box.is-light{background:linear-gradient(140deg,#FFF,#F3F5F6)}
.hv-logo-preview-box.is-dark{background:linear-gradient(140deg,#0B1F33,#1B405D)}
.hv-logo-preview-box img{width:100%;height:100%;max-height:121px;object-fit:contain}
.hv-logo-field{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:800;color:#374C60}
.hv-logo-field select{background:#FFF;border:1px solid #D8E1E9;color:#0B1F33;padding:9px 10px;min-height:40px;border-radius:9px;font:650 11px "Noto Sans Arabic",Tahoma,sans-serif;width:100%}
.hv-logo-type-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:11px}
.hv-logo-type-bottom>button{background:#FAFBFC!important;border:1px solid #DDE4EB!important;border-radius:8px;color:#34506B!important;padding:6px 10px;font-size:10px;cursor:pointer}
.hv-logo-type-bottom>button:disabled{opacity:.45;cursor:not-allowed}
.hv-logo-type-bottom>span{font-size:10px;color:#8A6D3D}
.hv-logo-upload{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid #E9EDF2;padding-top:15px}
.hv-logo-upload h3{font-size:15px;margin:0;color:#0B1F33;font-weight:800}
.hv-logo-upload h3 small{font-size:11px;color:#7D8C99}
.hv-logo-upload p{font-size:11px;color:#718191;margin:4px 0 0}
.hv-logo-upload-button,.hv-logo-save{display:inline-flex;justify-content:center;align-items:center;text-align:center;border:1px solid #0B1F33!important;background:#0B1F33!important;color:white!important;border-radius:10px!important;font-weight:800!important;font-size:12px;min-height:42px;padding:10px 15px!important;cursor:pointer;white-space:nowrap}
.hv-logo-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hv-logo-file{display:flex;align-items:center;gap:10px;min-width:0;border:1px solid #E1E7EE;background:#FAFBFC;border-radius:11px;padding:9px}
.hv-logo-file-thumb{flex:0 0 65px;height:49px;border-radius:7px;overflow:hidden;background:#EDF1F5;display:grid;place-items:center}
.hv-logo-file-thumb img{width:100%;height:100%;object-fit:contain}
.hv-logo-file-title{flex:1;min-width:0}
.hv-logo-file-title b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#19344D}
.hv-logo-file-title small{display:block;color:#7A8A98;font-size:10px}
.hv-logo-file>button{border:1px solid #EBD4D1!important;background:#FFF5F4!important;color:#A6403B!important;border-radius:7px;padding:6px 10px!important;font-size:10px;cursor:pointer}
.hv-logo-file>button:disabled{opacity:.4;cursor:not-allowed}
.hv-logo-empty{grid-column:1/-1;border:1px dashed #CDD8E2;padding:16px;text-align:center;background:#F7F9FB;border-radius:10px;font-size:11px;color:#768999;margin:0}
.hv-logo-footnote{font-size:11px;color:#657B8D;margin:0}
.hv-logo-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 26px;border-top:1px solid #E3E8EE;background:#FAFBFC}
#hvLogoNotice{font-size:11px;color:#376C4F;overflow-wrap:anywhere}
#hvLogoNotice[data-error="1"]{color:#AB3E3A}
.hv-logo-footer>div{display:flex;gap:9px;flex:none}
.hv-logo-cancel{background:#FFF!important;border:1px solid #D8E0E8!important;border-radius:10px;color:#243B53!important;padding:10px 15px!important;font-size:12px;cursor:pointer}
.hv-logo-save:disabled{opacity:.45;cursor:default}
.hv-logo-dialog :is(button,select,input):focus-visible{outline:2px solid #B68A45;outline-offset:2px}
@media(max-width:760px){
 .hv-logo-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}
 .hv-logo-dialog .hv-logo-shell{max-height:calc(100dvh - 14px)}
 .hv-logo-head,.hv-logo-body,.hv-logo-footer{padding-inline:14px}
 .hv-logo-types,.hv-logo-library{grid-template-columns:1fr}
 .hv-logo-preview-box{height:124px}
 .hv-logo-upload{flex-direction:column;align-items:stretch}
 .hv-logo-footer{flex-direction:column;align-items:stretch}
 .hv-logo-footer>div{justify-content:flex-end}
 .hv-logo-head h2{font-size:21px}
}
@media(prefers-reduced-motion:reduce){.hv-logo-dialog *{transition:none!important}}

/* Different artwork dimensions must never disturb the established page layout. */
html[data-haval-brand="white-first"] :is(#app,#portalView,#loginView) img.hv-custom-logo {
 object-fit:contain!important;filter:none!important;
}
