:root{--blue:#0a3f8f;--blue2:#0d63c8;--yellow:#f7c900;--ink:#14213d;--muted:#61708a;--line:#e5eaf1}
*{box-sizing:border-box}html{font-size:15px}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:linear-gradient(135deg,#fffdf3 0%,#f4f8ff 48%,#eef7ff 100%);font-size:15px;line-height:1.5}
.top{background:rgba(255,255,255,.97);box-shadow:0 2px 14px rgba(10,63,143,.08);position:relative;z-index:5}.top:before{content:"";position:absolute;inset:0 0 auto 0;height:10px;background:linear-gradient(90deg,var(--yellow),#fff 38%,#fff 62%,var(--blue2));opacity:.9}
.head-wrap{min-height:190px;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:26px 4% 18px;background:linear-gradient(110deg,rgba(255,215,70,.16),rgba(255,255,255,.92) 28%,rgba(255,255,255,.96) 72%,rgba(37,126,221,.14))}
.brand-area{display:flex;align-items:center;gap:26px;min-width:410px}.brand-logo{width:120px;height:120px;display:flex;align-items:center;justify-content:center;flex:none}.brand-logo img{width:108px;height:108px;object-fit:contain;display:block;transform:none}.logo-placeholder{width:96px;height:96px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--yellow));color:#fff;font-size:52px;font-weight:800;display:grid;place-items:center}.brand-text{display:flex;flex-direction:column;gap:3px;max-width:530px}.brand-text strong{font-size:24px;line-height:1.2;color:var(--blue);letter-spacing:.2px}.brand-text b{font-size:18px;line-height:1.3}.brand-text span{font-size:15px;color:var(--muted);margin-top:5px;max-width:500px}
.officials{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:15px;align-items:start}.official-box{text-align:center;min-width:120px;font-size:12px;line-height:1.25}.official-photo{width:124px;height:124px;margin:0 auto 8px;border-radius:12px;background:linear-gradient(180deg,#f6f8fb,#e9eef5);display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 3px 12px rgba(20,33,61,.09)}.official-photo img{width:100%;height:100%;object-fit:contain;object-position:center bottom;display:block}.official-photo span{font-size:11px;color:#8793a5}.official-box strong{font-size:12px}
.nav-law{background:linear-gradient(90deg,#063a87,#0c4d9e,#073a84);color:#fff}.nav-inner{width:100%;padding:0 3%;min-height:56px;display:flex;align-items:center}.nav-law a{color:#fff;text-decoration:none;font-size:14px;font-weight:700;padding:17px 13px;display:block;white-space:nowrap}.nav-law a:hover{background:rgba(255,255,255,.08);color:var(--yellow)}.nav-law .navbar-toggler{display:none;color:#fff;border:1px solid rgba(255,255,255,.5);background:transparent;padding:6px 10px}.btn-login,.btn-logout{display:inline-block;text-decoration:none;font-weight:700;font-size:13px;padding:10px 18px;border-radius:9px;margin-left:6px}.btn-login{background:var(--yellow);color:#151515}.btn-logout{background:#fff;color:#1a1a1a}
main.container-fluid{padding-left:20px!important;padding-right:20px!important}.hero{margin:16px auto 0;max-width:calc(100% - 12px);position:relative}.hero .carousel{border-radius:16px;overflow:hidden;box-shadow:0 7px 22px rgba(20,33,61,.12);border:1px solid rgba(10,63,143,.08)}.hero img{height:360px;object-fit:cover;width:100%}.hero .carousel-caption{background:rgba(0,0,0,.48);left:7%;right:7%;bottom:24px;padding:16px 20px;text-align:left;border-radius:8px}.hero .carousel-caption h2{font-size:24px;line-height:1.25;margin-bottom:6px}.hero .carousel-caption p{font-size:15px;margin-bottom:0}
.section-title{font-weight:800;color:var(--blue);margin-bottom:16px;font-size:20px;line-height:1.3}.panel{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:14px;padding:20px;height:100%;box-shadow:0 5px 20px rgba(20,33,61,.06)}.card h5{font-size:17px;line-height:1.35}.card p,.panel p,.list-group-item{font-size:15px}.news-card{border:1px solid var(--line);border-radius:12px;overflow:hidden}.news-card img{height:180px;object-fit:cover}.status{font-size:12px;font-weight:700;padding:5px 9px;border-radius:20px;background:#e9eef5}.table{font-size:14px}.table th{font-size:14px}.table td,.table th{vertical-align:middle}.form-label,.form-control,.form-select,textarea{font-size:15px}.form-text{font-size:12px}.btn{font-size:14px}.footer{background:#082f6c;color:#fff;font-size:14px}.admin-side{min-height:calc(100vh - 70px);background:#082f6c;font-size:14px}.admin-side a{color:#fff;text-decoration:none;display:block;padding:11px 15px;border-radius:6px;font-size:14px}.admin-side a:hover{background:#164d7c}.dashboard-card{border:0;border-top:4px solid var(--yellow);box-shadow:0 5px 20px rgba(0,0,0,.08)}.dashboard-card .card-title{font-size:17px}.dashboard-card .display-6{font-size:30px}.profile-thumb{width:42px;height:42px;object-fit:cover;border-radius:50%}.settings-menu a{display:block;padding:10px 12px;text-decoration:none;color:var(--ink);border-radius:6px;font-size:14px}.settings-menu a.active,.settings-menu a:hover{background:#eef5fb;color:var(--blue)}.setting-preview{display:block;width:140px;height:105px;object-fit:contain;border-radius:10px;margin-bottom:8px;background:#f3f5f7}.upload-setting{height:100%}
@media(max-width:1200px){.head-wrap{flex-direction:column;align-items:stretch}.brand-area{min-width:0}.officials{grid-template-columns:repeat(4,1fr)}.official-photo{width:105px;height:105px}.official-box{min-width:90px}.nav-inner{padding:0 2%}}
@media(max-width:850px){.officials{grid-template-columns:repeat(2,1fr)}.brand-area{gap:15px}.brand-logo{width:90px;height:90px}.brand-logo img{width:82px;height:82px}.brand-text strong{font-size:21px}.brand-text b{font-size:16px}.nav-law .navbar-toggler{display:block}.nav-law .navbar-collapse{width:100%}.nav-law a{font-size:13px;padding:10px 7px}.hero img{height:280px}}
@media(max-width:650px){html{font-size:14px}body{font-size:14px}.head-wrap{padding:22px 15px 15px}.brand-area{align-items:flex-start}.brand-logo{width:70px;height:70px}.brand-logo img{width:66px;height:66px}.brand-text strong{font-size:19px}.brand-text b{font-size:15px}.brand-text span{font-size:13px}.official-photo{width:92px;height:92px}.official-box strong{font-size:11px}.hero{margin-top:12px;max-width:100%}.hero img{height:230px}.hero .carousel-caption{left:5%;right:5%;bottom:12px;padding:10px 12px}.hero .carousel-caption h2{font-size:18px}.hero .carousel-caption p{font-size:13px}main.container-fluid{padding-left:12px!important;padding-right:12px!important}.section-title{font-size:18px}.card h5{font-size:16px}.card p,.panel p,.list-group-item{font-size:14px}.table{font-size:13px}.table th{font-size:13px}.form-label,.form-control,.form-select,textarea{font-size:14px}.btn-login,.btn-logout{padding:8px 12px}}

/* V8 layout refinement: narrower page + always-visible desktop navigation */
body{background:linear-gradient(135deg,#fff9dd 0%,#f6f9ff 38%,#edf5ff 100%)}
.site-shell{width:min(1280px,calc(100% - 48px));margin:18px auto 28px;background:rgba(255,255,255,.88);border-radius:18px;box-shadow:0 10px 35px rgba(10,63,143,.12);overflow:hidden}
.top{border-radius:18px 18px 0 0;box-shadow:none}
.head-wrap{min-height:176px;padding:24px 30px 18px;gap:24px}
.brand-area{gap:20px;min-width:390px}
.brand-logo{width:105px;height:105px}.brand-logo img{width:94px;height:94px}
.brand-text strong{font-size:23px}.brand-text b{font-size:17px}.brand-text span{font-size:14px}
.officials{gap:12px}.official-box{min-width:112px}.official-photo{width:112px;height:112px;border-radius:11px}
.nav-inner{padding:0 18px;min-height:58px;gap:8px}
.nav-law .collapse{display:flex!important;flex-basis:auto}
.nav-law .navbar-nav{display:flex;flex-direction:row;align-items:center;gap:2px}
.nav-law a{font-size:13px;padding:17px 11px}
.nav-law .navbar-toggler{display:none}
.btn-login,.btn-logout{font-size:13px;padding:9px 15px}
.site-main{padding-left:18px!important;padding-right:18px!important}
.hero{max-width:100%;margin-top:16px}
.hero .carousel{border-radius:15px}
.hero img{height:335px}
.panel{padding:18px;border-radius:13px}
.section-title{font-size:19px}
.footer{border-radius:0 0 18px 18px}

@media(max-width:1120px){
 .site-shell{width:min(1180px,calc(100% - 28px));margin:12px auto 22px}
 .head-wrap{padding:20px 22px 16px;gap:18px}
 .brand-area{min-width:350px;gap:14px}.brand-logo{width:90px;height:90px}.brand-logo img{width:82px;height:82px}
 .brand-text strong{font-size:21px}.brand-text b{font-size:16px}.brand-text span{font-size:13px}
 .officials{gap:8px}.official-box{min-width:98px}.official-photo{width:96px;height:96px}
 .nav-law a{font-size:12px;padding-left:8px;padding-right:8px}
 .hero img{height:310px}
}
@media(max-width:900px){
 .site-shell{width:calc(100% - 20px);margin:10px auto 18px}
 .head-wrap{flex-direction:column;align-items:stretch}.brand-area{min-width:0}
 .officials{grid-template-columns:repeat(4,1fr)}
 .official-photo{width:100%;max-width:110px;height:100px}
 .nav-law .navbar-toggler{display:block;margin:8px 0}.nav-law .collapse{display:none!important}.nav-law .collapse.show{display:block!important}
 .nav-inner{display:block;padding:0 14px}.nav-law .navbar-nav{flex-direction:column;align-items:stretch}.nav-law a{padding:10px 8px}
 .nav-law .collapse>ul{margin-bottom:8px}
 .hero img{height:280px}
}
@media(max-width:600px){
 .site-shell{width:calc(100% - 10px);margin:5px auto 12px;border-radius:12px}
 .head-wrap{padding:16px 12px}.brand-area{gap:10px}.brand-logo{width:65px;height:65px}.brand-logo img{width:60px;height:60px}
 .brand-text strong{font-size:18px}.brand-text b{font-size:14px}.brand-text span{font-size:12px}
 .officials{grid-template-columns:repeat(2,1fr);gap:12px}.official-photo{height:105px}.official-box strong{font-size:11px}
 .site-main{padding-left:8px!important;padding-right:8px!important}.hero{margin-top:10px}.hero img{height:220px}
}
/* V9: navigation, official names, compact banner and thumbnails */
.official-role{font-size:11px;font-weight:800;color:var(--blue);line-height:1.18;text-transform:uppercase;min-height:26px}.official-name{font-size:11px;font-weight:700;color:#27344f;line-height:1.18;margin-top:2px;min-height:26px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head>a{font-size:13px;font-weight:700;color:var(--blue);text-decoration:none;white-space:nowrap}.section-head>a:hover{color:#07336f;text-decoration:underline}.hero .carousel-indicators{margin-bottom:10px}.hero .carousel-indicators [data-bs-target]{width:8px;height:8px;border-radius:50%;border:0;margin:0 4px}.banner-fallback{height:335px;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;background:linear-gradient(115deg,#063a87 0%,#0d63c8 52%,#f7c900 100%);padding:30px}.banner-fallback span{font-weight:800;letter-spacing:2px;font-size:15px}.banner-fallback h1{font-size:30px;max-width:800px;margin:10px auto}.banner-fallback p{font-size:16px}.news-home{display:flex;align-items:center}.news-home>img{width:145px;height:105px;flex:0 0 145px;object-fit:cover}.news-home .card-body{padding:14px 16px}.news-home h5{font-size:16px;margin:4px 0}.news-home p{font-size:13px;margin:5px 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.page-hero{margin:18px 0 0;padding:28px 30px;border-radius:14px;background:linear-gradient(115deg,#073a84,#0d63c8 68%,#f7c900);color:#fff;box-shadow:0 7px 22px rgba(20,33,61,.10)}.page-hero h1{font-size:26px;margin:0 0 5px}.page-hero p{margin:0;font-size:14px}.page-content{min-height:280px}.page-content p{font-size:15px;line-height:1.75}.nav-law .navbar-nav{flex-wrap:nowrap}.nav-law .navbar-collapse>ul{overflow:visible}
@media(max-width:1200px){.nav-law a{font-size:11px;padding-left:7px;padding-right:7px}.btn-login,.btn-logout{font-size:11px;padding:8px 11px}.official-role,.official-name{font-size:10px}}
@media(max-width:900px){.nav-law .navbar-nav{flex-direction:column;align-items:stretch}.nav-law a{font-size:13px}.news-home{display:block}.news-home>img{width:100%;height:130px;display:block}.banner-fallback{height:280px}.banner-fallback h1{font-size:24px}}

/* V10: final header refinement */
.brand-logo{width:118px;height:118px;align-self:center}
.brand-logo img{width:112px;height:112px;object-fit:contain}
.official-box{line-height:1.12}
.official-role{font-size:10.5px;min-height:0;margin-top:2px;line-height:1.12}
.official-name{font-size:10.5px;margin-top:1px;min-height:0;line-height:1.12}
.official-photo{margin-bottom:5px}
.banner-fallback-image{background-size:cover;background-position:center;position:relative}
.banner-fallback-image:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,39,92,.82),rgba(3,39,92,.28) 52%,rgba(3,39,92,.08));}
.banner-fallback-image>div{position:relative;z-index:1;text-align:left;margin-left:3%;max-width:720px}
@media(max-width:1120px){.brand-logo{width:92px;height:92px}.brand-logo img{width:86px;height:86px}.official-role,.official-name{font-size:9.5px}}

/* V11: compact long official names and JDIH navigation */
.official-name{font-size:10px;line-height:1.08;max-width:150px;margin-left:auto;margin-right:auto;overflow-wrap:anywhere;}
.official-box:nth-child(3) .official-name{font-size:9px;}
.nav-law .navbar-nav{align-items:center;}
.nav-law .navbar-nav li{display:flex;align-items:center;}
@media(max-width:1200px){.official-name{font-size:9px;max-width:130px}.official-box:nth-child(3) .official-name{font-size:8.5px;}}
@media(max-width:900px){.official-name{font-size:10px;max-width:none}.official-box:nth-child(3) .official-name{font-size:9px;}}

/* V12: dashboard clean white layout + role rules */
.dashboard-page{background:#fff;}
.dashboard-container{background:#fff;}
.dashboard-layout{align-items:stretch;}
.dashboard-content{min-width:0;}
.dashboard-welcome{background:#fff;padding:2px 2px 14px;}
.dashboard-welcome h2{font-size:28px;line-height:1.2;margin:0 0 6px;color:var(--ink);}
.dashboard-welcome p{font-size:15px;color:var(--muted);margin:0;}
.admin-side-light{background:#fff;color:var(--ink);border:1px solid #e4eaf2;box-shadow:0 5px 18px rgba(20,33,61,.07);min-height:0;height:100%;}
.admin-side-light h5{color:var(--blue);font-size:17px;margin-bottom:12px;}
.admin-side-light a{color:#19345e;border:1px solid transparent;margin:3px 0;padding:10px 13px;font-size:14px;}
.admin-side-light a:hover{background:#f3f7fc;color:var(--blue);}
.admin-side-light a.active{background:var(--blue);color:#fff;}
.dashboard-card{background:#fff;border:1px solid #e6ebf2;border-top:4px solid var(--yellow);border-radius:12px;box-shadow:0 5px 16px rgba(20,33,61,.06);height:100%;}
.dashboard-card .card-body{padding:16px 18px;}
.dashboard-card small{font-size:14px;color:#4f5e74;}
.dashboard-card h2{font-size:30px;line-height:1;margin:8px 0 0;color:var(--ink);}
.workflow-panel{background:#fff;border:1px solid #e2e8f0;box-shadow:0 5px 18px rgba(20,33,61,.06);padding:22px;}
.workflow-note{font-size:12px;color:var(--muted);}
.workflow-track{display:flex;align-items:center;gap:8px;margin-top:18px;overflow-x:auto;padding:3px 0 8px;}
.workflow-step{min-width:135px;flex:1;background:#fff;border:1px solid #dfe6ef;border-radius:10px;text-align:center;padding:13px 8px;}
.workflow-number{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;margin:0 auto 7px;background:#f7c900;color:#14213d;font-weight:800;}
.workflow-label{font-size:14px;font-weight:700;color:#17345e;}
.workflow-arrow{font-size:22px;font-weight:700;color:var(--blue);flex:none;}
.workflow-description{font-size:14px;line-height:1.7;margin:15px 0 0;color:#3f506a;}
.dashboard-page + .footer{margin-top:0!important;}
.dashboard-page ~ .footer{position:relative;clear:both;}
@media(max-width:900px){.admin-side-light{height:auto}.dashboard-welcome h2{font-size:24px}.workflow-track{gap:6px}.workflow-step{min-width:115px}.workflow-arrow{font-size:18px}}

/* V12 footer flow fix: footer follows dashboard content, never overlays workflow */
.dashboard-page{display:block;min-height:0;}
.dashboard-layout .admin-side{min-height:0!important;height:100%;}
.dashboard-layout{margin-bottom:0;}
.dashboard-container{padding-bottom:28px!important;}
.gallery-thumb{height:190px;object-fit:cover}.gallery-public-img{height:220px;object-fit:cover}.gallery-public-card{overflow:hidden;border:1px solid #e4eaf2;border-radius:14px}.gallery-public-card img{transition:transform .2s ease}.gallery-public-card:hover img{transform:scale(1.02)}

/* V14: Logout only in dashboard side menu; top navigation keeps Dashboard/Login only */
.dashboard-page .admin-side-light a[href$="logout.php"]{color:#c62828;font-weight:700;}
