:root{--khp:#006c58;--khp-dark:#003f35;--khp-gold:#b88735;--warm:#f8f5ef}
html,body{width:100%;max-width:none!important}.app-shell{width:100vw!important;max-width:none!important;margin:0!important}.workspace,.dashboard{width:100%!important;max-width:none!important}
@media (min-width:901px){
body{overflow:hidden;background:var(--warm)}
.app-shell{grid-template-columns:275px minmax(0,1fr) 0;height:100vh}.app-shell.detail-open{grid-template-columns:275px minmax(0,1fr) 340px}.sidebar{z-index:5;box-sizing:border-box;width:275px;padding:16px 16px 0;border-right:1px solid #e1e5e2;background:#fff}.brand{height:58px;padding:0 10px}.sidebar-brand-logo{width:52px;height:52px}.brand-copy strong{font-size:19px}.brand-copy small{font-size:10px;color:#80908a}
.new-chat{height:49px;margin:16px 12px 17px;border-radius:8px;background:linear-gradient(135deg,#087762,#006550);font-size:13px;font-weight:700}.primary-nav{display:grid;gap:4px;margin:0 0 24px}.primary-nav-item{display:flex;gap:14px;align-items:center;height:44px;padding:0 15px;border:0;border-radius:8px;background:transparent;color:#263a34;font:600 12px Manrope,sans-serif}.primary-nav-item svg{width:18px}.primary-nav-item.active,.primary-nav-item:hover{background:#eaf4f1;color:var(--khp)}
.history-panel{margin:0!important;padding:0 8px!important}.history-title{text-transform:uppercase;color:#89908d!important;font-size:10px!important}.history-search{height:39px!important;border-radius:7px!important}.history-list{max-height:270px;overflow:auto}.history-row{grid-template-columns:minmax(0,1fr) 28px!important}.history-item{height:34px!important;min-height:34px!important;padding:5px 8px!important;font-size:10px!important}.history-delete{width:27px!important;height:27px!important}
.advisor-card{right:16px!important;bottom:80px!important;left:16px!important;height:178px!important;border:1px solid #d8e6e1!important;border-radius:9px!important;background:#f5faf8!important}.advisor-card-copy{padding:15px 95px 12px 12px!important}.advisor-card-copy strong{font-size:12px!important}.advisor-card-copy span{font-size:9px!important}.advisor-card:after{position:absolute;bottom:14px;left:12px;padding:7px 10px;border:1px solid var(--khp);border-radius:5px;content:"Chat với chuyên viên  →";color:var(--khp);font-size:9px;font-weight:700}.advisor-card img{right:5px!important;height:165px!important}.sidebar-footer{position:absolute;right:0;bottom:0;left:0;height:70px;padding:11px 20px!important;border-top:1px solid #e4e6e3;background:#fff}.account-mark{background:linear-gradient(135deg,#c38b24,#e0ae48)!important}
.workspace{position:relative;overflow:auto;background:var(--warm)}.app-shell:not(.chat-mode) .workspace{overflow:hidden;background:var(--warm)!important}.app-shell:not(.chat-mode) .topbar{position:absolute!important;z-index:8;top:17px;right:22px;left:auto!important;display:flex;width:auto!important;height:44px!important;background:transparent!important}.app-shell:not(.chat-mode) .menu-button,.app-shell:not(.chat-mode) .chat-heading{display:none!important}.app-shell:not(.chat-mode) .profile-button{order:2}.notification-button{display:grid!important;place-items:center;order:1}.app-shell.chat-mode .notification-button{display:none!important}
.app-shell:not(.chat-mode) .dashboard{min-height:100vh!important;background:var(--warm)!important}.app-shell:not(.chat-mode) .welcome-panel{position:relative!important;box-sizing:border-box!important;display:flex!important;min-height:100vh!important;padding:61px 44px 18px!important;overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.08) 0,rgba(255,255,255,.18) 275px,rgba(248,245,239,.78) 410px,var(--warm) 485px,var(--warm) 100%),url("assets/khp-premium-interior-hero-v2.png") center top/100% 485px no-repeat!important;background-color:var(--warm)!important}
.app-shell:not(.chat-mode) .welcome-brand{z-index:1;flex:0 0 auto;width:84px!important;height:84px!important;margin:0!important;box-shadow:0 8px 25px rgba(0,72,58,.18)!important}.app-shell:not(.chat-mode) .welcome-panel>h1{z-index:1;margin:7px 0 0!important;color:var(--khp-dark)!important;font-size:34px!important;font-weight:800!important;line-height:1.15!important;letter-spacing:-.04em!important}.app-shell:not(.chat-mode) .welcome-panel>h1:after{content:none!important}.app-shell:not(.chat-mode) .welcome-panel>h1 span{color:var(--khp-gold)!important}.app-shell:not(.chat-mode) .welcome-panel>p{z-index:1;max-width:720px!important;margin:8px auto 0!important;color:#63706c!important;font-size:13px!important;line-height:1.65!important;text-align:center!important}
.brand-slogan{position:absolute;z-index:1;top:76px;right:34px;display:grid;width:190px;color:#7d7062;text-align:center}.brand-slogan span{font:500 10px/1.8 "Playfair Display",serif;letter-spacing:.22em}.brand-slogan i{width:44px;margin:12px auto 20px;border-top:1px solid #b88a44}.brand-slogan strong{color:#b28543;font:italic 22px/1.25 "Playfair Display",serif;transform:rotate(-5deg)}
.app-shell:not(.chat-mode) .hero-search{position:relative!important;z-index:2;right:auto!important;bottom:auto!important;left:auto!important;order:1!important;width:min(780px,65vw)!important;max-width:780px!important;height:70px!important;margin:18px auto 0!important;padding:7px 10px 7px 22px!important;border:1px solid #d6dcd9!important;border-radius:38px!important;background:#fff!important;box-shadow:0 13px 32px rgba(28,51,44,.15)!important}.hero-search>button[type=submit]{width:54px!important;height:54px!important;border-radius:50%!important}.hero-search input{font-size:13px!important}.app-shell:not(.chat-mode) .trust-note{order:2!important;margin-top:8px!important;color:#8b918e!important;font-size:9px!important}
.app-shell:not(.chat-mode) .quick-actions{z-index:2;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;order:3!important;gap:20px!important;width:min(1080px,100%)!important;margin:26px auto 0!important}.app-shell:not(.chat-mode) .quick-actions [data-action="quick-inventory"],.app-shell:not(.chat-mode) .quick-actions [data-action="featured-projects"],.app-shell:not(.chat-mode) .quick-actions [data-action="appointment"],.app-shell:not(.chat-mode) .action-break{display:none!important}.app-shell:not(.chat-mode) .action-card{box-sizing:border-box!important;display:flex!important;gap:13px!important;align-items:center!important;width:auto!important;height:69px!important;padding:10px 16px!important;border:1px solid #e0e3e0!important;border-radius:8px!important;background:#fff!important;box-shadow:0 6px 18px rgba(31,52,46,.10)!important}.app-shell:not(.chat-mode) .action-card>svg{flex:0 0 38px!important;width:38px!important;height:38px!important;padding:9px!important;border-radius:50%!important;background:#eaf5f2!important;color:var(--khp)!important}.app-shell:not(.chat-mode) .action-card span{display:grid!important;gap:2px!important;text-align:left!important}.action-card span strong{color:#193b33;font-size:12px}.action-card span small{color:#8a918e;font-size:9px}
.app-shell:not(.chat-mode) .featured-showcase{z-index:2;order:4!important;width:min(1140px,100%)!important;margin:27px auto 0!important;background:transparent!important}.featured-heading{align-items:end!important;margin-bottom:12px!important}.featured-heading>div{position:relative;padding-left:22px}.featured-heading>div:before{position:absolute;top:1px;bottom:1px;left:0;width:5px;border-radius:4px;background:#d79d35;content:""}.featured-heading h2{color:#173e35!important;font-size:18px!important}.featured-heading p{margin:2px 0 0;color:#7c8581;font-size:10px}.featured-heading button{font-size:10px!important}.app-shell:not(.chat-mode) .featured-home-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;min-height:225px!important;background:transparent!important}.featured-home-card{border-radius:8px!important;background:#fff!important;box-shadow:0 5px 17px rgba(28,50,43,.11)!important}.featured-home-card>img{height:155px!important}.featured-home-body{padding:9px 12px!important}.featured-home-body>strong{font-size:12px!important}.featured-home-body>span{font-size:9px!important}.featured-home-body>div{margin-top:7px!important}
.home-trust-strip{z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));order:5;width:min(1140px,100%);margin:auto auto 0;padding-top:16px;border-top:1px solid #e0e2df}.home-trust-strip>div{display:flex;gap:12px;align-items:center;justify-content:center;min-width:0;padding:0 24px;border-right:1px solid #e3e4e1}.home-trust-strip>div:nth-child(3){border-right:1px solid #e3e4e1}.home-trust-strip svg{flex:0 0 26px;width:26px;color:var(--khp)}.home-trust-strip span{display:grid}.home-trust-strip strong{color:#29443d;font-size:10px}.home-trust-strip small{margin-top:3px;color:#8a918e;font-size:8px}.home-trust-strip em{display:flex;align-items:center;justify-content:center;align-self:center;min-width:0;padding:0 20px;color:#b48542;font:italic 16px/1.15 "Playfair Display",serif;text-align:center;transform:rotate(-4deg)}
.app-shell:not(.chat-mode) .trust-note{display:none!important}
}

/* Final desktop alignment: keep the four trust items at the bottom, let the
   project cards consume the remaining height, and render send like a tool icon. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .hero-search{padding-right:18px!important}
.app-shell:not(.chat-mode) .hero-search>button[type=submit]{width:40px!important;height:40px!important;flex:0 0 40px!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--khp)!important;box-shadow:none!important}
.app-shell:not(.chat-mode) .hero-search>button[type=submit] svg{width:21px!important;height:21px!important}
.app-shell:not(.chat-mode) .featured-showcase{display:flex!important;min-height:0!important;flex:1 1 0!important;flex-direction:column!important}
.app-shell:not(.chat-mode) .featured-heading{flex:0 0 auto!important}
.app-shell:not(.chat-mode) .featured-home-grid{flex:1 1 auto!important;min-height:225px!important}
.app-shell:not(.chat-mode) .featured-home-card{display:flex!important;height:100%!important;min-height:0!important;flex-direction:column!important}
.app-shell:not(.chat-mode) .featured-home-card>img{height:auto!important;min-height:155px!important;flex:1 1 auto!important;object-fit:cover!important}
.app-shell:not(.chat-mode) .featured-home-body{flex:0 0 auto!important}
.app-shell:not(.chat-mode) .home-trust-strip{flex:0 0 auto!important;margin:20px auto 0!important}
}

/* Keep featured cards compact; the imagery must not stretch to fill viewport. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .featured-showcase{display:block!important;min-height:auto!important;flex:0 0 auto!important}
.app-shell:not(.chat-mode) .featured-home-grid{display:grid!important;min-height:225px!important;height:auto!important;flex:none!important}
.app-shell:not(.chat-mode) .featured-home-card{display:flex!important;height:auto!important;min-height:0!important;flex-direction:column!important}
.app-shell:not(.chat-mode) .featured-home-card>img{display:block!important;width:100%!important;height:155px!important;min-height:155px!important;flex:0 0 155px!important;object-fit:cover!important}
.app-shell:not(.chat-mode) .home-trust-strip{margin:20px auto 0!important}
}

/* Keep the trust footer at the bottom and split the remaining vertical space
   evenly across the three gaps marked in the desktop mockup. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .quick-actions{margin-top:auto!important}
.app-shell:not(.chat-mode) .featured-showcase{margin-top:auto!important}
.app-shell:not(.chat-mode) .home-trust-strip{margin-top:auto!important}
}

/* Slightly larger project cards and trust benefits without oversized artwork. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .featured-home-card>img{height:170px!important;min-height:170px!important;flex-basis:170px!important}
.app-shell:not(.chat-mode) .featured-home-body{padding:11px 13px!important}
.app-shell:not(.chat-mode) .featured-home-body>strong{font-size:13px!important}
.app-shell:not(.chat-mode) .featured-home-body>span{font-size:10px!important}
.app-shell:not(.chat-mode) .featured-home-body>div{margin-top:9px!important}
.app-shell:not(.chat-mode) .home-trust-strip{padding-top:18px!important;padding-bottom:4px!important}
.app-shell:not(.chat-mode) .home-trust-strip>div{gap:14px!important;padding-right:28px!important;padding-left:28px!important}
.app-shell:not(.chat-mode) .home-trust-strip svg{width:30px!important;height:30px!important;flex-basis:30px!important}
.app-shell:not(.chat-mode) .home-trust-strip strong{font-size:11px!important}
.app-shell:not(.chat-mode) .home-trust-strip small{font-size:9px!important}
.app-shell:not(.chat-mode) .home-trust-strip em{font-size:18px!important}
}

/* Balanced two-line typography inside the four primary actions. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .quick-actions .action-card>span{display:flex!important;height:auto!important;min-width:0!important;flex-direction:column!important;gap:3px!important;align-items:flex-start!important;justify-content:center!important;line-height:1.25!important}
.app-shell:not(.chat-mode) .quick-actions .action-card>span>strong{margin:0!important;color:#173a32!important;font-size:12px!important;font-weight:700!important;line-height:1.25!important;white-space:nowrap!important}
.app-shell:not(.chat-mode) .quick-actions .action-card>span>small{margin:0!important;color:#77827e!important;font-size:10px!important;font-weight:400!important;line-height:1.3!important;white-space:nowrap!important}
}

/* Home header controls are intentionally hidden; align the advisor portrait. */
@media (min-width:901px){
.app-shell:not(.chat-mode) .topbar{display:none!important}
.sidebar{position:relative!important;box-sizing:border-box!important;height:100vh!important;min-height:100vh!important;align-self:stretch!important;padding-bottom:270px!important;overflow:hidden!important}
.history-panel{min-height:0!important}
.advisor-card{position:absolute!important;right:16px!important;bottom:80px!important;left:16px!important;box-sizing:border-box!important;display:block!important;width:auto!important;height:178px!important;margin:0!important;padding:0!important;overflow:hidden!important;text-align:left!important}
.advisor-card-copy{position:absolute!important;z-index:2!important;top:17px!important;left:12px!important;box-sizing:border-box!important;width:124px!important;padding:0!important}
.advisor-card-copy strong{font-size:11px!important;line-height:1.35!important}
.advisor-card-copy span{margin-top:7px!important;font-size:8px!important;line-height:1.5!important}
.advisor-card:after{z-index:3!important;right:auto!important;bottom:13px!important;left:12px!important}
.advisor-card img,.support-card.advisor-card>img{position:absolute!important;z-index:1!important;right:-4px!important;bottom:0!important;width:142px!important;height:174px!important;object-fit:contain!important;object-position:right bottom!important}
.sidebar-footer{position:absolute!important;right:0!important;bottom:0!important;left:0!important;width:auto!important;margin:0!important}
}
@media (max-width:1200px) and (min-width:901px){.brand-slogan{display:none}.app-shell:not(.chat-mode) .welcome-panel{padding-right:25px!important;padding-left:25px!important}.home-trust-strip{display:none}.featured-home-card>img{height:135px!important}}
@media (max-width:900px){.primary-nav{display:none}.brand-slogan,.home-trust-strip,.notification-button{display:none!important}.app-shell:not(.chat-mode) .welcome-panel{background:linear-gradient(180deg,rgba(255,255,255,.36),#f8f7f4 350px),url("assets/khp-premium-interior-hero-v2.png") center top/auto 350px no-repeat!important}.app-shell:not(.chat-mode) .welcome-panel>h1 span{display:block;color:var(--khp-gold)}}

@media (min-width:901px){
.sidebar{display:flex!important;flex-direction:column!important}.brand{flex:0 0 58px}.new-chat{flex:0 0 49px}.sidebar .primary-nav{display:grid!important;flex:0 0 140px!important;grid-template-rows:repeat(3,44px)!important;gap:4px!important;margin:0 0 24px!important}.primary-nav-item{display:flex!important;gap:14px!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:44px!important;padding:0 15px!important;text-align:left!important}.history-panel{flex:1 1 auto!important;min-height:0!important}.history-list{max-height:225px!important;overflow:auto!important}
.advisor-card{position:relative!important;right:auto!important;bottom:auto!important;left:auto!important;flex:0 0 178px!important;width:100%!important;height:178px!important;margin:12px 0 10px!important}.advisor-card-copy{box-sizing:border-box!important;width:150px!important;padding:15px 8px 12px 12px!important;text-align:left!important}.advisor-card-copy strong{line-height:1.45!important}.advisor-card-copy span{line-height:1.5!important}.sidebar-footer{position:relative!important;right:auto!important;bottom:auto!important;left:auto!important;flex:0 0 70px!important;width:calc(100% + 32px)!important;margin-left:-16px!important}
.app-shell:not(.chat-mode) .action-card{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important}.app-shell:not(.chat-mode) .action-card>svg{position:static!important;margin:0!important;transform:none!important}.app-shell:not(.chat-mode) .action-card span{position:static!important;margin:0!important;transform:none!important}.quick-actions [data-action="quick-consult"]{order:1}.quick-actions [data-action="compare"]{order:2}.quick-actions [data-action="loan"]{order:3}.quick-actions [data-action="quick-policy"]{order:4}
}

/* Must remain last: pin advisor and account footer to the viewport bottom. */
@media (min-width:901px){
.sidebar{position:relative!important;height:100vh!important;min-height:100vh!important;padding-bottom:270px!important;overflow:hidden!important}
.sidebar .advisor-card{position:absolute!important;right:16px!important;bottom:80px!important;left:16px!important;width:auto!important;height:178px!important;margin:0!important;padding:0!important}
.sidebar .advisor-card-copy{position:absolute!important;top:17px!important;left:12px!important;width:124px!important;padding:0!important}
.sidebar .advisor-card>img{position:absolute!important;right:-4px!important;bottom:0!important;width:142px!important;height:174px!important}
.sidebar .advisor-card:after{background:#fff!important}
.sidebar .sidebar-footer{position:absolute!important;right:0!important;bottom:0!important;left:0!important;width:auto!important;margin:0!important}
.sidebar .new-chat{box-sizing:border-box!important;display:flex!important;width:calc(100% - 24px)!important;height:48px!important;min-height:48px!important;flex:0 0 48px!important;gap:9px!important;align-items:center!important;justify-content:center!important;margin:14px 12px 18px!important;padding:0 16px!important;border:1px solid #006653!important;border-radius:8px!important;background:#006c58!important;color:#fff!important;font-size:13px!important;font-weight:700!important;box-shadow:0 5px 14px rgba(0,91,74,.13)!important}
.sidebar .new-chat:hover{background:#00594a!important;box-shadow:0 7px 17px rgba(0,91,74,.18)!important;transform:translateY(-1px)}
.sidebar .new-chat svg{width:17px!important;height:17px!important}
.sidebar .primary-nav-item{text-decoration:none!important}
}

/* All mobile quick-action labels use one visual hierarchy. */
@media (max-width:900px){
.app-shell:not(.chat-mode) .quick-actions .action-card>span{display:block!important;color:#253a34!important;font-size:12px!important;font-weight:600!important;line-height:1.35!important}
.app-shell:not(.chat-mode) .quick-actions .action-card>span>strong{color:inherit!important;font-size:inherit!important;font-weight:inherit!important;line-height:inherit!important}
.app-shell:not(.chat-mode) .quick-actions .action-card>span>small{display:none!important}
}

.featured-home-media{position:relative;height:170px;min-height:170px;overflow:hidden;background:#edf2ef}
.featured-home-media>img{display:block;width:100%;height:100%;object-fit:cover}
.featured-project-badge{position:absolute;top:12px;left:12px;display:flex;gap:6px;align-items:center;padding:7px 11px;border-radius:18px;background:rgba(255,255,255,.9);color:#3e4b47;font-size:10px;font-weight:600;box-shadow:0 3px 10px rgba(24,43,37,.12);backdrop-filter:blur(5px)}
.featured-project-badge svg{width:14px;height:14px}.featured-project-badge.featured svg{color:#d79a25;fill:#f4c65d}.featured-project-badge.interest svg{color:#e46a45;fill:#f08a68}.featured-project-badge.potential svg{color:#178863;fill:#5dbb93}
.featured-favorite{position:absolute;top:10px;right:10px;display:grid;width:31px;height:31px;padding:0;place-items:center;border:0;border-radius:0;background:transparent;color:#fff;cursor:pointer;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35))}
.featured-favorite svg{width:21px;height:21px}.featured-favorite.selected svg{fill:#fff}.featured-favorite:hover{background:transparent;transform:scale(1.08)}
@media (min-width:901px){.app-shell:not(.chat-mode) .featured-home-card>img{display:none!important}.app-shell:not(.chat-mode) .featured-home-media{height:170px!important;min-height:170px!important;flex:0 0 170px!important}}
@media (max-width:900px){.featured-home-media{height:145px;min-height:145px}.featured-project-badge{top:9px;left:9px;padding:6px 9px}.featured-favorite{top:8px;right:8px}}
