
/* Visual refresh: Cooperative Portal Dashboard */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');
:root{--navy:#063b70;--blue:#0874d1;--gold:#e9b92f;--ink:#17324d;--muted:#718196;--bg:#f4f8fc;--line:#e2ebf3;--red:#cc4b5a;--green:#16865b;--shadow:0 10px 28px rgba(34,80,118,.06)}
*{box-sizing:border-box}body{margin:0;font-family:'IBM Plex Sans Thai',Arial,sans-serif;color:var(--ink);background:radial-gradient(circle at 78% -10%,#e9f4ff 0,transparent 32%),var(--bg)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}button{cursor:pointer}
.container{width:100%;max-width:100%;margin:0;padding:24px 36px;box-sizing:border-box}.hero{background:linear-gradient(115deg,#064784,#168fe1);color:#fff;border-radius:24px;padding:64px 8%;min-height:320px;display:flex;align-items:center;box-shadow:0 12px 30px #0a4d8a33}.hero h1{font-size:46px;max-width:640px;margin:0 0 16px;font-family:'Plus Jakarta Sans','IBM Plex Sans Thai',sans-serif}.hero p{font-size:16px;max-width:560px;line-height:1.8}.btn{border:0;border-radius:9px;padding:11px 17px;font-weight:700;cursor:pointer;display:inline-block;font-size:16px;transition:.18s ease}.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--blue);color:#fff}.btn-gold{background:linear-gradient(135deg,#f5cc4b,#e4af1b);color:#12304a;box-shadow:0 7px 18px rgba(221,169,25,.2)}.btn-outline{border:1px solid var(--line);color:#1269a7;background:#fff}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.card{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:15px;padding:22px;box-shadow:var(--shadow)}.stat strong{font-size:30px;color:var(--navy);display:block;margin-top:8px;font-family:'Plus Jakarta Sans',sans-serif}.muted{color:var(--muted);font-size:16px}.section-title{display:flex;justify-content:space-between;align-items:center;margin:34px 0 14px}.section-title h1,.section-title h2{font-family:'Plus Jakarta Sans','IBM Plex Sans Thai',sans-serif;color:var(--navy);font-size:25px}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.table{width:100%;border-collapse:collapse;min-width:720px}.table th,.table td{padding:14px 16px;text-align:left;border-bottom:1px solid #edf2f5;font-size:16px}.table th{background:#f8fbfd;color:#8194a5;font-size:16px;font-weight:700}.badge{border-radius:20px;padding:5px 12px;font-size:14px;font-weight:700;display:inline-block}.badge.pending{background:#fff1c9;color:#8a6500}.badge.approved,.badge.published{background:#d9f4e7;color:#08724b}.badge.rejected{background:#ffe0e0;color:#ac3535}.badge.draft{background:#ddeeff;color:#075a91}.form-card{max-width:520px;margin:30px auto}.form-group{margin:14px 0}.form-group label{display:block;font-weight:700;margin-bottom:7px;font-size:16px}.form-control,textarea,select{width:100%;padding:11px 13px;border:1px solid #cbd9e6;border-radius:9px;font:inherit;font-size:16px;background:#fff;outline:none}.form-control:focus,textarea:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 3px #0874d122}.alert{padding:12px 16px;border-radius:10px;margin-bottom:18px;background:#e4f3ff;color:#075a91;font-size:16px}.alert.error{background:#ffe2e2;color:#9a2222}.alert.success{background:#dff6e9;color:#146c48}.site-header+main{min-height:calc(100vh - 140px)}footer{padding:24px;text-align:center;color:var(--muted);background:#fff;font-size:16px}
/* Admin shell */.app-shell{display:flex;min-height:100vh;background:radial-gradient(circle at 78% -10%,#e9f4ff 0,transparent 32%),var(--bg);font-size:16px}.sidebar{width:252px;background:linear-gradient(180deg,#073f78 0%,#052b56 100%);color:#fff;padding:26px 16px 20px;display:flex;flex-direction:column;box-shadow:9px 0 30px rgba(19,67,106,.08);position:sticky;top:0;height:100vh;overflow-y:auto;box-sizing:border-box}.sidebar .brand{color:#fff;font-size:18px;font-weight:700;margin:0 10px 24px;padding-bottom:20px;border-bottom:1px solid rgba(255,255,255,.14);display:flex;align-items:center;word-break:break-word;line-height:1.35}.sidebar .brand:first-letter,.sidebar .brand::first-letter{color:inherit}.sidebar nav{display:grid;gap:5px}.sidebar nav a{padding:12px 13px;border-radius:10px;color:#cfe1f3;font-weight:500;font-size:16px;transition:.18s ease}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(90deg,#0874d1,#146bc0);color:#fff;box-shadow:0 7px 18px rgba(0,98,190,.25)}.sidebar nav a:nth-child(2)::first-letter{color:#f5cc50}.logout{margin-top:auto;padding:13px;color:#d6e7f6;font-size:16px;border-radius:10px}.logout:hover{background:rgba(255,255,255,.08);color:#fff}.main-area{flex:1;min-width:0}.topbar{height:78px;background:rgba(255,255,255,.86);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;position:sticky;top:0;z-index:4;backdrop-filter:blur(12px)}.topbar strong{font-family:'Plus Jakarta Sans','IBM Plex Sans Thai',sans-serif;color:var(--navy);font-size:20px}.topbar span{color:var(--muted);font-size:16px}.main-area>.alert,.main-area>.container{margin:34px 36px}.main-area>.container{max-width:none;padding:0}.main-area>.container>.section-title{margin-top:0}.kpi{border-left:4px solid var(--blue)}.kpi.gold{border-left-color:var(--gold)}.kpi.red{border-left-color:var(--red)}.kpi div{color:#62778d;font-size:16px}.kpi strong{font-size:30px}.actions{display:flex;gap:10px;flex-wrap:wrap}.split{display:grid;grid-template-columns:2fr 1fr;gap:20px}.login-bg{background:linear-gradient(140deg,#053c74,#dfeef9);min-height:calc(100vh - 76px);display:grid;place-items:center;padding:20px}.login-bg .form-card{width:100%;margin:0}.form-card h1{color:var(--navy);font-size:26px}.icon{font-size:28px;color:var(--blue)}
@media(max-width:900px){.grid-4{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}.sidebar{width:210px}.topbar{padding:0 24px}.main-area>.alert,.main-area>.container{margin:28px 24px}.hero h1{font-size:34px}}
@media(max-width:640px){.container{padding:18px 12px}.grid-4,.grid-3{grid-template-columns:1fr}.hero{padding:38px 24px}.hero h1{font-size:30px}.app-shell{display:block}.sidebar{width:100%;min-height:auto;padding:14px}.sidebar .brand{margin:0 8px 12px;padding-bottom:12px}.sidebar .brand small{margin-left:0;margin-top:3px}.sidebar nav{display:flex;overflow:auto}.sidebar nav a{white-space:nowrap}.sidebar .logout{display:none}.topbar{height:70px;padding:0 16px}.topbar span{font-size:14px}.main-area>.alert,.main-area>.container{margin:18px 14px}.section-title{align-items:flex-start;gap:14px;flex-direction:column}.section-title .actions{width:100%}.section-title .actions .btn{width:100%;text-align:center}.table th,.table td{padding:10px;font-size:16px}.actions .btn{width:100%;text-align:center}}

/* Public homepage reference design */
.public-home{max-width:100%;margin:-32px -20px -32px}.ref-hero{min-height:405px;display:grid;grid-template-columns:42% 58%;overflow:hidden;background:#0754a0;color:#fff}.ref-hero-copy{padding:58px clamp(30px,8vw,110px) 52px clamp(30px,8vw,110px);position:relative;z-index:1;background:linear-gradient(95deg,#064784 0%,#0a57a3 78%,rgba(10,87,163,.35) 100%)}.hero-kicker{color:#f2c83e;font-size:16px;font-weight:700;letter-spacing:.08em}.ref-hero h1{white-space:pre-line;font:800 clamp(32px,3.2vw,54px)/1.18 'Plus Jakarta Sans','IBM Plex Sans Thai',sans-serif;margin:15px 0 12px}.ref-hero p{max-width:560px;font-size:16px;line-height:1.8;color:#e1effb;margin:0 0 21px}.ref-hero-button{display:inline-flex;align-items:center;gap:24px;border-radius:99px;padding:12px 20px;color:#17324d;background:#f3c53d;font-size:16px;font-weight:700;box-shadow:0 8px 18px rgba(3,35,75,.2)}.ref-hero-button span{font-size:21px;line-height:0}.ref-hero-image{background:linear-gradient(90deg,rgba(7,84,160,.15),transparent 28%),url('hero-building.jpg') center/cover no-repeat;min-height:405px}.ref-kpis{max-width:1120px;margin:-1px auto 0;padding:20px 0 14px;display:grid;grid-template-columns:repeat(4,1fr);position:relative;z-index:2}.ref-kpi{display:flex;align-items:center;gap:13px;min-height:88px;padding:15px 20px;background:#fff;border-right:1px solid #e4ebf1;box-shadow:0 5px 16px rgba(38,82,116,.08)}.ref-kpi:first-child{border-radius:0 0 0 10px}.ref-kpi:last-child{border-radius:0 0 10px 0;border:0}.ref-kpi-icon{width:45px;height:45px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;font-size:22px}.ref-kpi-icon.people,.ref-kpi-icon.bank{color:#fff;background:#217bc0}.ref-kpi-icon.coins,.ref-kpi-icon.percent{color:#fff;background:#dfae19}.ref-kpi small{display:block;color:#587188;font-size:16px}.ref-kpi strong{display:block;color:#103e6b;font:800 34px 'Plus Jakarta Sans',sans-serif;margin-top:2px}.ref-kpi strong em{font:400 16px 'IBM Plex Sans Thai',sans-serif;color:#718397}.ref-kpi:nth-child(4) strong{font:600 18px 'IBM Plex Sans Thai';margin-top:5px}.ref-kpi>b{margin-left:auto;color:#20618d;font-size:17px}.ref-section,.ref-news-grid{max-width:1120px;margin:0 auto}.ref-section{padding:3px 0 24px}.ref-section-head,.ref-list-head{display:flex;justify-content:space-between;align-items:center}.ref-section-head h2{display:flex;align-items:center;gap:13px;color:#17456f;font-size:25px;font-weight:700}.ref-section-head h2 i{display:block;width:44px;height:3px;background:#e9b92f}.ref-section-head a,.ref-list-head a{color:#20618d;font-size:16px;font-weight:700}.ref-services{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.ref-service{display:flex;align-items:center;gap:11px;padding:17px 14px;border-radius:7px;color:#173f65;background:#f0f7fc;border:1px solid #e4eff6;box-shadow:0 4px 11px rgba(24,80,119,.04)}.ref-service:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(24,80,119,.1)}.ref-service>span{width:42px;height:42px;display:grid;place-items:center;flex-shrink:0;border-radius:50%;color:#0874d1;background:#fff;font-size:22px}.ref-service div{min-width:0;flex:1}.ref-service strong,.ref-service small{display:block}.ref-service strong{font-size:18px;font-weight:700}.ref-service small{color:#7890a3;font-size:16px;line-height:1.55;margin-top:4px}.ref-service>b{color:#7d9ab0}.ref-news-grid{display:grid;grid-template-columns:1fr 1fr 1.08fr;gap:16px;padding:0 0 30px}.ref-list-card{background:#fff;border:1px solid #e0eaf2;border-radius:8px;box-shadow:0 4px 14px rgba(30,74,110,.05);overflow:hidden}.ref-list-head{padding:16px 16px 11px}.ref-list-head h2{color:#16486f;font-size:20px;font-weight:700;margin:0}.ref-news-row{display:flex;align-items:center;gap:10px;padding:12px 15px;border-top:1px solid #edf2f6;font-size:16px;color:#46637b}.ref-news-row:hover{background:#f7fbfe}.ref-news-row time{color:#92a2b0;font-size:16px;min-width:56px}.ref-news-row span{flex:1;line-height:1.45}.ref-news-row>b{color:#7e9bb1}.event{display:flex;align-items:center;gap:10px;padding:9px 15px;border-top:1px solid #edf2f6;font-size:16px}.event>time{width:36px;height:38px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;border-radius:6px;background:#1769aa;line-height:1}.event>time strong{font-size:17px}.event>time small{font-size:12px;margin-top:3px}.event>div{flex:1;min-width:0}.event>div strong,.event>div small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event>div strong{color:#375976;font-size:16px}.event>div small{color:#8b9ba8;font-size:14px;margin-top:3px}.event>b{color:#7e9bb1}.public-home~footer,body:has(.public-home) footer{color:#d8eafa;background:#063b70;text-align:left;padding:25px 8%;margin-top:0}
@media(max-width:900px){.public-home{margin:-28px -24px -28px}.ref-hero{grid-template-columns:1fr}.ref-hero-image{min-height:230px;grid-row:1}.ref-hero-copy{padding:35px 28px}.ref-kpis,.ref-section,.ref-news-grid{padding-left:24px;padding-right:24px}.ref-kpis{grid-template-columns:repeat(2,1fr);margin-top:-1px}.ref-kpi{border-bottom:1px solid #e4ebf1}.ref-kpi:first-child{border-radius:0}.ref-kpi:last-child{border-radius:0}.ref-services{grid-template-columns:repeat(2,1fr)}.ref-news-grid{grid-template-columns:1fr 1fr}.calendar-card{grid-column:span 2}}
@media(max-width:640px){.public-home{margin:-18px -12px -18px}.ref-hero-image{min-height:180px}.ref-hero-copy{padding:31px 20px 36px}.ref-hero h1{font-size:31px}.ref-hero p{font-size:16px}.ref-kpis{padding:0 12px;grid-template-columns:1fr 1fr}.ref-kpi{padding:12px 9px;gap:7px}.ref-kpi-icon{width:35px;height:35px;font-size:17px}.ref-kpi strong{font-size:22px}.ref-kpi small{font-size:15px}.ref-kpi>b{display:none}.ref-section,.ref-news-grid{padding-left:12px;padding-right:12px}.ref-section-head{align-items:flex-start;gap:5px;flex-direction:column}.ref-services{grid-template-columns:1fr}.ref-news-grid{grid-template-columns:1fr}.calendar-card{grid-column:auto}.ref-list-head{padding:14px 13px}.ref-news-row{padding:11px 13px}}

.ref-footer{display:grid;grid-template-columns:1.4fr 1.2fr 1.1fr 1fr;gap:30px;color:#d8eafa!important;background:#063b70!important;text-align:left;padding:28px max(24px,8%)!important;margin-top:0;font-size:16px}.ref-footer strong,.ref-footer small{display:block}.ref-footer strong{font-size:18px;color:#fff;margin-bottom:7px;font-weight:700}.ref-footer small{font-size:16px;line-height:1.8;color:#b9d4eb}@media(max-width:640px){.ref-footer{grid-template-columns:1fr 1fr;gap:22px;padding:24px 18px!important}}

/* Full-width public homepage styles */
.container:has(.public-home){max-width:none;width:100%;padding:26px 36px 36px 36px;margin:0;box-sizing:border-box}
.public-home{width:100%;max-width:none;margin:0;box-sizing:border-box}
/* Hero Slider Wrapper & Slides */
.hero-slider-wrap{position:relative;overflow:hidden;border-radius:18px;margin:0 0 32px;box-shadow:0 10px 30px rgba(7,84,160,.14);background:#0754a0;width:100%}
.hero-slider-track{position:relative;width:100%;min-height:420px}
.hero-slide{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:opacity .6s cubic-bezier(.4,0,.2,1),transform .6s cubic-bezier(.4,0,.2,1);transform:scale(.99);pointer-events:none;z-index:1}
.hero-slide.active{position:relative;opacity:1;visibility:visible;transform:scale(1);pointer-events:auto;z-index:2}
.hero-slide .ref-hero{margin:0;border-radius:0;box-shadow:none;min-height:420px;width:100%}
.hero-slide .ref-hero-image{min-height:420px;background-position:center;background-size:cover;background-repeat:no-repeat}

/* Full Graphic Banner Slide (when title is empty) */
.ref-hero-graphic{display:flex;align-items:center;justify-content:center;min-height:420px;background:#0754a0;overflow:hidden}
.ref-hero-graphic-link{display:block;width:100%;height:100%;min-height:420px}
.ref-hero-graphic-img{width:100%;height:100%;min-height:420px;max-height:500px;object-fit:cover;display:block;transition:transform .4s ease}
.ref-hero-graphic-link:hover .ref-hero-graphic-img{transform:scale(1.02)}

/* Slider Controls: Arrows */
.hero-slider-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:10;width:46px;height:46px;border-radius:50%;background:rgba(10,35,65,.45);color:#fff;border:1.5px solid rgba(255,255,255,.35);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;transition:all .25s ease;user-select:none;box-shadow:0 4px 16px rgba(0,0,0,.2);padding:0;line-height:1}
.hero-slider-arrow:hover{background:#f2c83e;color:#0c2d48;border-color:#f2c83e;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 20px rgba(242,200,62,.4)}
.hero-slider-arrow.prev{left:18px}
.hero-slider-arrow.next{right:18px}

/* Slider Controls: Dots */
.hero-slider-dots{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);z-index:10;display:flex;gap:8px;align-items:center;background:rgba(6,35,65,.5);padding:6px 14px;border-radius:99px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.2)}
.hero-slider-dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.45);border:none;cursor:pointer;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1)}
.hero-slider-dot:hover{background:rgba(255,255,255,.85)}
.hero-slider-dot.active{width:28px;border-radius:6px;background:#f2c83e;box-shadow:0 0 10px rgba(242,200,62,.7)}

/* Mid-Page Banner Slider (คั่นระหว่าง 6 เมนูลัด และ ข่าวสาร/กิจกรรม) */
.mid-slider-section{width:100%;margin:28px 0 36px;box-sizing:border-box}
.mid-slider-wrap{position:relative;width:100%;overflow:hidden;border-radius:18px;box-shadow:0 8px 24px rgba(7,84,160,.12);background:#0754a0}
.mid-slider-track{position:relative;width:100%;min-height:280px}
.mid-slide{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:opacity .6s cubic-bezier(.4,0,.2,1),transform .6s cubic-bezier(.4,0,.2,1);transform:scale(.99);pointer-events:none;z-index:1;display:flex;align-items:center;justify-content:center}
.mid-slide.active{position:relative;opacity:1;visibility:visible;transform:scale(1);pointer-events:auto;z-index:2}
.mid-slide-link{display:block;width:100%;height:100%;text-decoration:none;position:relative;overflow:hidden}
.mid-slide-img{width:100%;height:auto;min-height:280px;max-height:480px;object-fit:cover;display:block;transition:transform .4s ease}
.mid-slide-link:hover .mid-slide-img{transform:scale(1.015)}
.mid-slide-overlay{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(to top, rgba(6,35,65,.88) 0%, rgba(6,35,65,.6) 60%, transparent 100%);padding:28px 32px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;color:#fff}
.mid-slide-content{max-width:75%}
.mid-slide-title{font-size:22px;font-weight:700;color:#fff;margin:0 0 6px 0;text-shadow:0 2px 4px rgba(0,0,0,.4);line-height:1.3}
.mid-slide-subtitle{font-size:15px;color:rgba(255,255,255,.92);margin:0;line-height:1.5;text-shadow:0 1px 3px rgba(0,0,0,.3)}
.mid-slide-btn{margin-left:auto;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.25)}
.mid-slider-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:10;width:44px;height:44px;border-radius:50%;background:rgba(10,35,65,.45);color:#fff;border:1.5px solid rgba(255,255,255,.35);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;cursor:pointer;transition:all .25s ease;user-select:none;box-shadow:0 4px 16px rgba(0,0,0,.2);padding:0;line-height:1}
.mid-slider-arrow:hover{background:#f2c83e;color:#0c2d48;border-color:#f2c83e;transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px rgba(242,200,62,.4)}
.mid-slider-arrow.prev{left:16px}
.mid-slider-arrow.next{right:16px}
.mid-slider-dots{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);z-index:10;display:flex;gap:8px;align-items:center;background:rgba(6,35,65,.55);padding:5px 12px;border-radius:99px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.2)}
.mid-slider-dot{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.45);border:none;cursor:pointer;padding:0;transition:all .3s cubic-bezier(.4,0,.2,1)}
.mid-slider-dot:hover{background:rgba(255,255,255,.85)}
.mid-slider-dot.active{width:26px;border-radius:5px;background:#f2c83e;box-shadow:0 0 8px rgba(242,200,62,.7)}

.ref-hero{display:grid;grid-template-columns:46% 54%;min-height:420px;overflow:hidden;background:#0754a0;color:#fff;border-radius:18px;margin:0 0 32px;box-shadow:0 10px 30px rgba(7,84,160,.14);width:100%}
.ref-hero-copy{display:flex;flex-direction:column;justify-content:center;padding:48px 42px;position:relative;z-index:1;background:linear-gradient(95deg,#064784 0%,#0a57a3 82%,rgba(10,87,163,.4) 100%)}
.ref-hero-image{display:block;min-height:420px;height:auto;background:linear-gradient(90deg,rgba(7,84,160,.15),transparent 28%),url('https://images.unsplash.com/photo-1541872703-74c5e44368f9?w=1600&q=80') center/cover no-repeat}
.ref-kpis,.ref-section,.ref-news-grid{width:100%;max-width:none}
.ref-footer{width:100%;box-sizing:border-box;padding:36px 36px!important;margin-top:0}
@media(max-width:900px){.container:has(.public-home){padding:20px 20px 28px 20px}.hero-slider-track,.mid-slider-track{min-height:auto}.hero-slide .ref-hero{grid-template-columns:1fr;min-height:auto}.hero-slide .ref-hero-copy{padding:32px 24px}.hero-slide .ref-hero-image{min-height:220px}.ref-hero-graphic,.ref-hero-graphic-link,.ref-hero-graphic-img{min-height:240px}.hero-slider-arrow{width:38px;height:38px;font-size:16px}.hero-slider-arrow.prev{left:10px}.hero-slider-arrow.next{right:10px}.hero-slider-dots{bottom:12px;padding:4px 10px}.mid-slide-img{min-height:200px;max-height:360px}.mid-slide-overlay{padding:18px 20px;flex-direction:column;align-items:flex-start;gap:10px}.mid-slide-content{max-width:100%}.mid-slide-title{font-size:18px}.mid-slide-subtitle{font-size:13px}.mid-slider-arrow{width:36px;height:36px;font-size:16px}.mid-slider-arrow.prev{left:8px}.mid-slider-arrow.next{right:8px}.mid-slider-dots{bottom:10px;padding:4px 10px}.ref-hero{grid-template-columns:1fr;min-height:auto}.ref-hero-copy{padding:32px 24px}.ref-hero-image{min-height:220px}.ref-kpis,.ref-section,.ref-news-grid{width:100%;padding-left:0;padding-right:0}}
@media(max-width:640px){.container:has(.public-home){padding:16px 16px 20px 16px}.hero-slide .ref-hero-image{min-height:180px}.ref-hero-graphic,.ref-hero-graphic-link,.ref-hero-graphic-img{min-height:180px}.hero-slider-arrow{width:32px;height:32px;font-size:14px}.mid-slide-img{min-height:150px;max-height:240px}.mid-slide-overlay{padding:12px 14px}.mid-slide-title{font-size:15px}.mid-slide-subtitle{display:none}.mid-slider-arrow{width:30px;height:30px;font-size:13px}.ref-hero-image{min-height:180px}.ref-footer{padding:24px 18px!important}}



/* ====================================================
   UNIFIED 16PX CONTENT TYPOGRAPHY & PRESERVED HEADINGS
   ==================================================== */
/* 1. Base 16px font size */
html, body {
    font-size: 16px;
    line-height: 1.6;
}

/* 2. Standard 16px font size for all non-heading content */
p,
.muted,
.cms-body,
.cms-breadcrumbs,
.cms-sidebar-links a,
.ref-hero p,
.ref-hero-button,
.hero-kicker,
.chairman-quote,
.chairman-title,
.quick-banner-card span,
.activity-date,
.ref-news-row,
.ref-news-row time,
.ref-news-row span,
.ref-news-row span small,
.ref-news-row span strong,
.event,
.event div strong,
.event div small,
.ref-service small,
.ref-kpi small,
.ref-kpi strong em,
.rate-item small,
.rates-header small,
.ref-footer,
.ref-footer small,
.ref-footer div,
.ref-footer a,
.site-topbar,
.topbar-left,
.topbar-right,
.topbar-right a,
.nav-link,
.dropdown-menu a,
.nav-action-btn,
.nav-logout-link,
.btn,
.btn-sm,
.btn-outline,
.btn-primary,
.btn-gold,
.table th,
.table td,
.table td small,
.form-group label,
.form-control,
textarea,
select,
.filter-bar input,
.filter-bar select,
.filter-bar button,
.alert,
.modal-body,
.modal-body p,
.download-item,
.calc-card p,
.calc-card div,
.calc-card label,
.calc-result small,
.app-shell,
.app-shell .table th,
.app-shell .table td,
.app-shell .table td small,
.app-shell .kpi div,
.app-shell .form-group label,
.app-shell .form-control,
.app-shell textarea,
.app-shell select,
.app-shell .modal-body,
.app-shell .modal-body p,
.app-shell .card p,
.app-shell .alert,
.sidebar nav a,
.sidebar .logout,
.topbar span {
    font-size: 16px;
}

/* 3. Badges: readable and nicely proportioned */
.badge,
.app-shell .badge {
    font-size: 14px;
    padding: 5px 12px;
}

/* 4. PRESERVED HEADINGS & BIG METRICS (Retain Original Sizes) */
h1 {
    font-size: 28px;
    font-weight: 700;
}
h2 {
    font-size: 24px;
    font-weight: 700;
}
h3 {
    font-size: 20px;
    font-weight: 700;
}
h4 {
    font-size: 17px;
    font-weight: 700;
}
.hero h1 {
    font-size: 46px;
    font-weight: 800;
}
.ref-hero h1 {
    font-size: clamp(32px, 3.2vw, 54px);
    font-weight: 800;
}

/* Section titles e.g. กิจกรรมสหกรณ์, ข่าวประชาสัมพันธ์ */
.section-title h1,
.section-title h2 {
    font-size: 25px;
    font-weight: 700;
}
.ref-section-head h2 {
    font-size: 25px;
    font-weight: 700;
}
.ref-list-head h2 {
    font-size: 20px;
    font-weight: 700;
}

/* Card titles & subheadings */
.activity-title {
    font-size: 16px;
    font-weight: 700;
}
.card h2,
.card h3,
.app-shell .card h2,
.app-shell .card h3 {
    font-size: 20px;
    font-weight: 700;
}
.cms-sidebar-card h3 {
    font-size: 18px;
    font-weight: 700;
}

/* Chairman, rates, service, footer titles */
.chairman-name {
    font-size: 22px;
    font-weight: 800;
}
.rates-header h2 {
    font-size: 22px;
    font-weight: 700;
}
.ref-service strong {
    font-size: 18px;
    font-weight: 700;
}
.ref-footer strong {
    font-size: 18px;
    font-weight: 700;
}
.modal-header h3,
.app-shell .modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}
.topbar strong {
    font-size: 20px;
    font-weight: 700;
}
.brand strong {
    font-size: 17px;
    font-weight: 700;
}
.sidebar .brand {
    font-size: 18px;
    font-weight: 700;
}

/* Key Performance Indicators & Large Numbers */
.ref-kpis .ref-kpi strong {
    font-size: 34px;
    font-weight: 800;
}
.rates-widget .rate-item strong {
    font-size: 26px;
    font-weight: 800;
}
.stat strong,
.kpi strong,
.app-shell .kpi strong {
    font-size: 30px;
    font-weight: 800;
}
.calc-result strong {
    font-size: 36px;
    font-weight: 800;
}

/* Mobile typography pass for preserved headings */
@media(max-width:640px){
    body { font-size: 16px; }
    .btn { font-size: 16px; }
    .section-title h1, .section-title h2 { font-size: 22px; }
    .ref-section-head h2 { font-size: 21px; }
    .ref-list-head h2 { font-size: 18px; }
    .ref-kpis .ref-kpi strong { font-size: 24px; }
    .rates-widget .rate-item strong { font-size: 22px; }
    .rates-header h2 { font-size: 20px; }
    .card h2, .card h3 { font-size: 18px; }
}

/* Components & Modals */
.modal-backdrop{position:fixed;inset:0;background:rgba(8,28,49,.58);display:none;align-items:center;justify-content:center;z-index:99;padding:16px;backdrop-filter:blur(3px)}
.modal-backdrop.active{display:flex}
.modal-box{background:#fff;border-radius:18px;width:100%;max-width:540px;max-height:90vh;overflow-y:auto;box-shadow:0 24px 60px rgba(7,38,70,.25);animation:popIn .2s ease-out}
@keyframes popIn{from{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}
.modal-header{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-header h3{margin:0;color:var(--navy);font-size:20px;font-weight:700}
.modal-close{background:none;border:none;font-size:24px;color:var(--muted);cursor:pointer;line-height:1}
.modal-close:hover{color:var(--red)}
.modal-body{padding:22px 24px}
.modal-footer{padding:16px 24px;background:#f8fbfe;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:12px;border-radius:0 0 18px 18px}
.btn-danger{background:var(--red);color:#fff}
.btn-danger:hover{background:#b83a48}
.btn-success{background:var(--green);color:#fff}
.btn-success:hover{background:#116d49}
.btn-sm{padding:7px 14px;font-size:16px;border-radius:7px}
.filter-bar{display:flex;gap:12px;flex-wrap:wrap;background:#fff;padding:16px;border-radius:14px;border:1px solid var(--line);margin-bottom:20px;align-items:center}
.filter-bar input,.filter-bar select{flex:1;min-width:180px;padding:10px 14px;border:1px solid #cbd9e6;border-radius:8px;font:inherit;font-size:16px}
.filter-bar button{white-space:nowrap;font-size:16px}
.badge.active{background:#d9f4e7;color:#08724b}
.badge.inactive{background:#f1f5f9;color:#64748b}
.calc-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px;box-shadow:var(--shadow)}
.calc-result{background:linear-gradient(135deg,#074785,#0d62ab);color:#fff;border-radius:14px;padding:24px;text-align:center;margin-top:20px}
.calc-result small{color:#d4e9fc;font-size:16px;display:block}
.calc-result strong{font-size:36px;font-family:'Plus Jakarta Sans',sans-serif;display:block;margin:6px 0;color:#fde16d;font-weight:800}
.service-detail-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow);margin-bottom:20px}
.service-detail-card h3{color:var(--navy);margin-top:0;display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700}
.download-item{display:flex;align-items:center;justify-content:space-between;padding:16px;background:#f8fbfe;border:1px solid var(--line);border-radius:10px;margin-bottom:10px;font-size:16px}
.download-item:hover{background:#eef6fc}

/* Admin shell typography & sizing (16px standard) */
.app-shell{font-size:16px}
.sidebar .brand{font-size:18px}
.sidebar .brand small{font-size:14px}
.sidebar nav a{font-size:16px;padding:13px 16px}
.sidebar .logout{font-size:16px}
.topbar strong{font-size:20px}
.topbar span{font-size:16px}
.app-shell .section-title h1,.app-shell .section-title h2{font-size:24px}
.app-shell .section-title .muted{font-size:16px}
.app-shell .table th{font-size:16px;padding:14px 16px;font-weight:700}
.app-shell .table td{font-size:16px;padding:14px 16px}
.app-shell .table td small{font-size:16px}
.app-shell .badge{font-size:14px;padding:6px 12px}
.app-shell .btn{font-size:16px;padding:10px 18px}
.app-shell .btn-sm{font-size:16px;padding:7px 14px}
.app-shell .kpi div{font-size:16px}
.app-shell .kpi strong{font-size:30px}
.app-shell .filter-bar input,.app-shell .filter-bar select{font-size:16px;padding:10px 14px}
.app-shell .form-group label{font-size:16px}
.app-shell .form-control,.app-shell textarea,.app-shell select{font-size:16px;padding:11px 14px}
.app-shell .modal-header h3{font-size:20px}
.app-shell .modal-body{font-size:16px;line-height:1.7}
.app-shell .modal-body p{font-size:16px}
.app-shell .card h2,.app-shell .card h3{font-size:20px}
.app-shell .card p{font-size:16px}
.app-shell .alert{font-size:16px}

/* ====================================================
   BKTSCC REFERENCE STYLES: HEADER, TOPBAR & MEGA DROPDOWN
   ==================================================== */
html, body {
    overflow-x: clip;
    max-width: 100%;
}

/* Topbar Strip (Desktop) */
.site-topbar{
    background:#032549;
    color:#b7d6f5;
    font-size:16px;
    border-bottom:1px solid rgba(255,255,255,.08);
    padding:8px 32px;
    width:100%;
    box-sizing:border-box;
}
.topbar-inner{
    width:100%;
    max-width:100%;
    margin:0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
}
.topbar-left{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:16px;
    white-space:nowrap;
}
.topbar-sep{opacity:.35}
.topbar-right{
    display:flex;
    align-items:center;
    gap:16px;
    font-size:16px;
    white-space:nowrap;
}
.topbar-right a{color:#d6e8fa;transition:color .15s;text-decoration:none}
.topbar-right a:hover{color:#f5cc4b}

/* Main Header (Sticky Navigation Menu Pinned to Top) */
.site-header{
    height:70px;
    min-height:70px;
    padding:0 32px;
    background:#ffffff;
    border-bottom:2px solid #0874d1;
    box-shadow:0 4px 20px rgba(6,59,112,.12);
    position:-webkit-sticky;
    position:sticky;
    top:0;
    z-index:1000;
    width:100%;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    transition:box-shadow .2s ease;
}
.header-inner{
    width:100%;
    max-width:100%;
    margin:0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:70px;
    min-height:70px;
    gap:12px;
    box-sizing:border-box;
}
.brand{
    font-size:16px;
    font-weight:700;
    color:var(--navy);
    display:flex;
    gap:10px;
    align-items:center;
    text-decoration:none;
    white-space:nowrap;
    flex-shrink:0;
}
.brand strong{
    display:block;
    white-space:nowrap;
    font-size:16px;
    line-height:1.2;
    color:var(--navy);
    font-weight:700;
}
.brand small{
    display:block;
    font-size:9.5px;
    color:#7a8e9f;
    font-weight:600;
    letter-spacing:.02em;
    white-space:nowrap;
    margin-top:2px;
}
.brand-badge{
    width:38px;
    height:38px;
    border-radius:50%;
    background:#e9b92f;
    color:#063b70;
    display:grid;
    place-items:center;
    font-size:19px;
    font-weight:900;
    flex-shrink:0;
}
.brand-logo-img{
    width:42px;
    height:42px;
    object-fit:contain;
    flex-shrink:0;
    display:block;
    transition:transform .22s ease;
}
.brand-logo-img.logo-circle{
    border-radius:50%;
    background:#ffffff;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    border:1px solid rgba(0,0,0,.05);
}
.brand-logo-img.logo-natural{
    border-radius:6px;
    max-height:42px;
}
.brand:hover .brand-logo-img{
    transform:scale(1.05);
}

/* Desktop Main Nav */
.main-nav{
    display:flex;
    align-items:center;
    gap:2px;
    flex-wrap:nowrap;
    flex-shrink:0;
}
.nav-link{
    padding:7px 9px;
    font-size:16px;
    font-weight:600;
    color:#173f65;
    border-radius:6px;
    transition:.15s;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:3px;
    white-space:nowrap;
    flex-shrink:0;
}
.nav-link:hover{
    color:#0874d1;
    background:#f0f7fd;
}

/* Dropdown Menu */
.nav-item-dropdown{
    position:relative;
    flex-shrink:0;
    padding-bottom:12px;
    margin-bottom:-12px;
}
.dropdown-arrow{
    font-size:12px;
    transition:transform .2s;
    opacity:0.75;
}
.dropdown-menu{
    display:none;
    position:absolute;
    top:calc(100% - 2px);
    left:0;
    min-width:250px;
    background:#fff;
    border-radius:10px;
    box-shadow:0 14px 36px rgba(6,59,112,.18);
    border:1px solid #dce8f2;
    padding:8px 0;
    z-index:250;
    white-space:nowrap;
}
/* Invisible hover bridge: covers the entire gap between trigger link and dropdown box */
.dropdown-menu::before{
    content:'';
    position:absolute;
    top:-20px;
    left:-20px;
    right:-20px;
    height:25px;
    background:transparent;
    pointer-events:auto;
}
/* Rightmost dropdowns open aligned to right to prevent desktop horizontal overflow */
.nav-item-dropdown:nth-last-child(-n+4) .dropdown-menu{
    left:auto;
    right:0;
}
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.open-hover .dropdown-menu{
    display:block;
    animation:dropFade .16s ease-out;
}
.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown.open-hover .dropdown-arrow{
    transform:rotate(180deg);
}
.nav-item-dropdown:hover > .nav-link,
.nav-item-dropdown.open-hover > .nav-link{
    color:#0874d1;
    background:#f0f7fd;
}
@keyframes dropFade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.dropdown-menu a{
    display:block;
    padding:10px 18px;
    font-size:16px;
    color:#223f5b;
    font-weight:500;
    text-decoration:none;
    transition:.15s;
    white-space:nowrap;
}
.dropdown-menu a:hover{
    background:#f0f7fe;
    color:#0874d1;
    padding-left:22px;
}

.nav-action-btn{
    margin-left:6px;
    font-size:16px;
    padding:8px 16px;
    border-radius:7px;
    white-space:nowrap;
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
}
.nav-logout-link{
    font-size:16px;
    color:var(--muted);
    margin-left:6px;
    padding:8px 8px;
    white-space:nowrap;
    flex-shrink:0;
    text-decoration:none;
}
.nav-logout-link:hover{
    color:var(--red);
}
.mobile-menu-toggle{
    display:none;
    background:none;
    border:none;
    font-size:24px;
    color:#063b70;
    cursor:pointer;
}

/* ====================================================
   HOMEPAGE CMS: CHAIRMAN, QUICK BANNERS, ACTIVITIES
   ==================================================== */
.chairman-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:32px 36px;box-shadow:var(--shadow);display:grid;grid-template-columns:200px 1fr;gap:36px;align-items:center;margin:28px 0;width:100%;box-sizing:border-box}
.chairman-avatar{width:190px;height:230px;object-fit:cover;border-radius:14px;box-shadow:0 8px 24px rgba(6,59,112,.15);border:3px solid #e9b92f}
.chairman-quote{font-size:16px;line-height:1.8;color:#1e3a58;font-style:italic;margin-bottom:16px}
.chairman-name{font-size:22px;font-weight:800;color:var(--navy);margin:0}
.chairman-title{font-size:16px;color:#627b94;margin-top:4px}

.quick-banner-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin:28px 0;width:100%;box-sizing:border-box}
.quick-banner-card{background:linear-gradient(145deg,#fff,#f4f9fd);border:1px solid #dce8f2;border-radius:14px;padding:22px 14px;text-align:center;text-decoration:none;color:#074785;font-weight:700;transition:transform .2s,box-shadow .2s;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-shadow:0 4px 14px rgba(7,71,133,.05)}
.quick-banner-card:hover{transform:translateY(-4px);box-shadow:0 12px 24px rgba(7,71,133,.14);border-color:#0874d1;color:#0874d1}
.quick-banner-icon{width:54px;height:54px;border-radius:50%;background:#e8f3fc;color:#0874d1;display:grid;place-items:center;font-size:24px}
.quick-banner-card:nth-child(1) .quick-banner-icon{background:#fef5d8;color:#b8860b}
.quick-banner-card:nth-child(2) .quick-banner-icon{background:#dff6e9;color:#0f8352}
.quick-banner-card:nth-child(3) .quick-banner-icon{background:#e2f0fd;color:#0a6cb9}
.quick-banner-card:nth-child(4) .quick-banner-icon{background:#f4eafd;color:#7e22ce}
.quick-banner-card:nth-child(5) .quick-banner-icon{background:#fee2e2;color:#b91c1c}
.quick-banner-card:nth-child(6) .quick-banner-icon{background:#ecfdf5;color:#047857}
.quick-banner-card span{font-size:16px;line-height:1.4}

.content-split{display:grid;grid-template-columns:1.15fr 1fr;gap:28px;margin:28px 0;width:100%;box-sizing:border-box;align-items:start}
.activity-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.activity-grid.compact{gap:12px}
.activity-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);transition:transform .18s;display:flex;flex-direction:column;text-decoration:none}
.activity-card:hover{transform:translateY(-3px)}
.activity-img{width:100%;height:160px;object-fit:cover;background:#e2ebf3}
.activity-info{padding:16px;flex:1;display:flex;flex-direction:column;justify-content:space-between}
.activity-date{font-size:16px;color:#6f859b;font-weight:600;display:inline-block;margin-bottom:6px}
.activity-title{font-size:16px;font-weight:700;color:#14375b;line-height:1.45;margin:0}

/* Compact News Row (ตัดเนื้อหาย่อออก) */
.ref-news-row.compact{align-items:center;padding:12px 18px;gap:14px}
.ref-news-row.compact time{min-width:54px;padding:4px 8px;font-size:13px;border-radius:6px}
.ref-news-row.compact strong{margin-bottom:0;font-size:15px;line-height:1.4}
.ref-news-row.compact b{font-size:16px;margin-left:4px}

/* Infographic / Announcement Posters (วางแทนกิจกรรมเดิมฝั่งซ้าย) */
.infographic-grid{display:grid;grid-template-columns:repeat(2, 1fr);gap:16px;width:100%;box-sizing:border-box}
.infographic-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;display:flex;flex-direction:column}
.infographic-card:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(7,84,160,.16);border-color:#b5cde5}
.infographic-img-wrap{position:relative;overflow:hidden;background:#f8fafc;cursor:pointer;display:block}
.infographic-img{width:100%;height:auto;display:block;transition:transform .35s ease}
.infographic-card:hover .infographic-img{transform:scale(1.025)}
.infographic-overlay{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(to top, rgba(7,84,160,.85) 0%, transparent 100%);padding:14px 12px 10px;color:#fff;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .25s ease}
.infographic-card:hover .infographic-overlay{opacity:1}
.infographic-overlay span{font-size:13px;font-weight:700;background:rgba(255,255,255,.2);padding:4px 12px;border-radius:20px;backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,.4)}
.infographic-caption{padding:12px 14px;background:#fff;flex:1;display:flex;flex-direction:column;justify-content:space-between;border-top:1px solid #f1f5f9}
.infographic-caption strong{color:var(--navy);font-size:15px;line-height:1.35;margin-bottom:2px;display:block}
.infographic-caption small{font-size:13px;color:#64748b;display:block}
.infographic-btn{margin-top:8px;font-size:13px;padding:6px 10px;text-align:center;width:100%;border-radius:6px;font-weight:600;color:var(--navy);border-color:#cbd5e1;background:#f8fafc;cursor:pointer;transition:all .15s ease}
.infographic-btn:hover{background:var(--navy);color:#fff;border-color:var(--navy)}

/* Poster Lightbox Modal */
.poster-lightbox{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(5,20,40,.85);z-index:99999;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);align-items:center;justify-content:center;padding:20px;box-sizing:border-box;opacity:0;transition:opacity .25s ease}
.poster-lightbox.show{display:flex;opacity:1}
.poster-lightbox-content{position:relative;max-width:92vw;max-height:92vh;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.5);display:flex;flex-direction:column;animation:posterModalScale .25s ease-out}
@keyframes posterModalScale{from{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}
.poster-lightbox-header{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:#074785;color:#fff}
.poster-lightbox-header h3{margin:0;font-size:16px;font-weight:700;color:#fff}
.poster-lightbox-close{background:rgba(255,255,255,.15);border:none;color:#fff;font-size:22px;width:34px;height:34px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s;padding:0;line-height:1}
.poster-lightbox-close:hover{background:#d32f2f;color:#fff}
.poster-lightbox-body{padding:12px;background:#0c2d48;display:flex;align-items:center;justify-content:center;overflow:auto;max-height:calc(92vh - 95px)}
.poster-lightbox-body img{max-width:100%;max-height:calc(92vh - 120px);height:auto;object-fit:contain;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.3)}
.poster-lightbox-footer{display:flex;justify-content:space-between;align-items:center;padding:10px 20px;background:#f8fafc;border-top:1px solid #e2e8f0;font-size:14px;flex-wrap:wrap;gap:10px}

/* Rates Widget */
.rates-widget{background:linear-gradient(135deg,#074785,#0a5ca6);color:#fff;border-radius:18px;padding:28px 36px;margin:28px 0;box-shadow:var(--shadow);width:100%;box-sizing:border-box}
.rates-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;border-bottom:1px solid rgba(255,255,255,.15);padding-bottom:14px}
.rates-header h2{color:#fff;margin:0;font-size:22px;font-weight:700}
.rates-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.rate-item{background:rgba(255,255,255,.1);border-radius:12px;padding:16px;text-align:center;backdrop-filter:blur(4px)}
.rate-item small{color:#d5e7f7;font-size:16px;display:block}
.rate-item strong{font-size:26px;font-family:'Plus Jakarta Sans',sans-serif;color:#fde047;display:block;margin-top:6px;font-weight:800}

/* CMS Page Layout */
.cms-layout{display:grid;grid-template-columns:1fr 340px;gap:32px;margin:24px 0;width:100%;max-width:100%;box-sizing:border-box}
.cms-article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:36px;box-shadow:var(--shadow)}
.cms-breadcrumbs{font-size:16px;color:var(--muted);margin-bottom:20px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cms-breadcrumbs a{color:var(--blue);text-decoration:none}
.cms-body{font-size:16px;line-height:1.85;color:#1c344d;white-space:pre-line;margin-top:24px}
.cms-sidebar-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;box-shadow:var(--shadow);margin-bottom:20px}
.cms-sidebar-card h3{color:var(--navy);font-size:18px;margin:0 0 12px;border-bottom:2px solid #e9b92f;padding-bottom:8px;font-weight:700}
.cms-sidebar-links{list-style:none;padding:0;margin:0}
.cms-sidebar-links li{border-bottom:1px solid #edf3f8}
.cms-sidebar-links a{display:block;padding:11px 8px;font-size:16px;color:#214365;font-weight:600;text-decoration:none;transition:padding-left .15s}
.cms-sidebar-links a:hover{color:var(--blue);padding-left:14px;background:#f0f7fe}

/* ====================================================
   RESPONSIVE BREAKPOINTS (DESKTOP & MOBILE FIXES)
   ==================================================== */

/* Laptops (1120px - 1340px) */
@media(max-width:1340px){
    .site-header{padding:0 20px}
    .site-topbar{padding:8px 20px}
    .container{padding:20px 20px}
    .container:has(.public-home){padding:0 20px 28px 20px}
    .ref-footer{padding:30px 20px!important}
    .nav-link{padding:6px 6px;font-size:15.5px;gap:2px}
    .brand strong{font-size:16px}
    .brand small{display:none}
    .brand-badge{width:36px;height:36px;font-size:18px}
    .brand-logo-img{width:36px;height:36px}
    .nav-action-btn{padding:6px 12px;font-size:15.5px;margin-left:4px}
    .nav-logout-link{font-size:15.5px;margin-left:4px;padding:6px}
}

/* Tablet & Mobile Breakpoint (<= 1120px) */
@media(max-width:1120px){
    /* Completely hide topbar on mobile to eliminate bloated header height */
    .site-topbar{
        display:none !important;
    }
    
    /* Sleek, fixed 56px height header on mobile (Sticky at top: 0) */
    .site-header{
        height:56px !important;
        min-height:56px !important;
        padding:0 16px !important;
        box-shadow:0 2px 10px rgba(6,59,112,.12) !important;
        position:-webkit-sticky !important;
        position:sticky !important;
        top:0 !important;
        z-index:1000 !important;
    }
    .header-inner{
        height:56px !important;
        min-height:56px !important;
        gap:8px;
    }
    .brand{
        flex:1;
        min-width:0;
        gap:8px;
        overflow:hidden;
    }
    .brand-badge{
        width:32px;
        height:32px;
        font-size:16px;
        flex-shrink:0;
    }
    .brand-logo-img{
        width:32px;
        height:32px;
        flex-shrink:0;
    }
    .brand strong{
        font-size:14px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        max-width:100%;
    }
    /* Hide long English subtitle on mobile to keep header single-line and compact */
    .brand small{
        display:none !important;
    }
    
    /* Clean, compact hamburger button */
    .mobile-menu-toggle{
        display:flex !important;
        align-items:center;
        justify-content:center;
        width:38px;
        height:38px;
        font-size:22px;
        line-height:1;
        background:#f0f7fe;
        border:1px solid #cde3f7;
        border-radius:8px;
        color:#063b70;
        cursor:pointer;
        flex-shrink:0;
    }
    .mobile-menu-toggle:hover{
        background:#e2f0fc;
    }

    /* Mobile Drawer Full Screen Overlay */
    .main-nav{
        display:none;
        position:fixed;
        top:56px;
        left:0;
        right:0;
        bottom:0;
        width:100%;
        height:calc(100vh - 56px);
        background:#ffffff;
        flex-direction:column;
        align-items:stretch;
        padding:12px 16px 40px;
        box-shadow:0 16px 36px rgba(0,0,0,.2);
        overflow-y:auto;
        z-index:9999;
        gap:0;
    }
    .main-nav.active{
        display:flex;
    }
    .main-nav .nav-link{
        padding:13px 14px;
        font-size:16px;
        color:#173f65;
        border-bottom:1px solid #edf2f7;
        border-radius:6px;
        justify-content:space-between;
        width:100%;
        white-space:normal;
    }
    .main-nav .nav-link:hover,
    .main-nav .nav-link:active{
        background:#f0f7fe;
        color:#0874d1;
    }
    
    /* Mobile Accordion Dropdowns */
    .main-nav .nav-item-dropdown{
        width:100%;
        padding-bottom:0;
        margin-bottom:0;
    }
    .main-nav .dropdown-menu::before{
        display:none;
    }
    .main-nav .nav-item-dropdown .dropdown-menu{
        display:none;
        position:static;
        box-shadow:none;
        border:1px solid #e2ecf5;
        background:#f5f9fc;
        margin:4px 0 8px;
        padding:4px 0;
        border-radius:8px;
        width:100%;
        min-width:0;
    }
    .main-nav .nav-item-dropdown.open .dropdown-menu{
        display:block !important;
    }
    .main-nav .nav-item-dropdown.open .dropdown-arrow{
        transform:rotate(180deg);
    }
    .main-nav .dropdown-menu a{
        padding:12px 18px;
        font-size:16px;
        color:#2a4b6c;
        border-bottom:1px solid #eef4f9;
        display:block;
        white-space:normal;
    }
    .main-nav .dropdown-menu a:last-child{
        border-bottom:none;
    }
    .main-nav .nav-action-btn{
        margin:16px 0 6px;
        width:100%;
        text-align:center;
        justify-content:center;
        padding:12px;
        font-size:16px;
        border-radius:8px;
    }
    .main-nav .nav-logout-link{
        display:block;
        text-align:center;
        margin:6px 0 0;
        padding:10px;
        color:#cc4b5a;
        font-weight:600;
        font-size:16px;
    }
    
    .quick-banner-grid{grid-template-columns:repeat(3,1fr)}
    .content-split{grid-template-columns:1fr}
    .cms-layout{grid-template-columns:1fr}
    .rates-grid{grid-template-columns:repeat(2,1fr)}
}

/* Small Smartphone Screen (<= 768px) */
@media(max-width:768px){
    .container{padding:14px}
    .container:has(.public-home){padding:0 14px 20px 14px}
    .chairman-card{grid-template-columns:1fr;text-align:center;justify-items:center;padding:20px 16px;gap:20px}
    .chairman-avatar{width:150px;height:180px}
    .quick-banner-grid{grid-template-columns:repeat(2,1fr);gap:12px}
    .activity-grid{grid-template-columns:1fr}
    .infographic-grid{grid-template-columns:1fr;max-width:440px;margin:0 auto}
    .rates-grid{grid-template-columns:1fr}
    .ref-footer{grid-template-columns:1fr 1fr;gap:20px;padding:24px 16px!important}
    .poster-lightbox{padding:10px}
    .poster-lightbox-header{padding:10px 14px}
    .poster-lightbox-footer{padding:8px 14px}
}

/* Pagination Component */
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 16px 0 28px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(10,50,90,.03);
}
.pagination-info {
    color: #55728d;
    font-size: 15px;
}
.pagination-info strong {
    color: var(--navy);
    font-weight: 700;
}
.pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: #1e4162;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
}
a.page-link:hover {
    background: #f0f7fe;
    border-color: #badcf7;
    color: var(--blue);
}
.page-link.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: default;
}
.page-link.disabled {
    color: #b0c2d3;
    background: #f8fafc;
    border-color: #e5edf4;
    cursor: not-allowed;
}
.page-link.dots {
    border: none;
    background: transparent;
    color: #8da2b6;
    min-width: 24px;
    padding: 0;
    cursor: default;
}
@media(max-width:640px){
    .pagination-wrap {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
        padding: 12px;
    }
    .pagination {
        justify-content: center;
    }
}

/* Admin Shell Main Content Spacing */
.main-content {
    padding: 32px 36px 48px;
    max-width: 100%;
    box-sizing: border-box;
}
.main-content > .section-title:first-child {
    margin-top: 0;
}
.main-content > .section-title {
    margin: 28px 0 16px;
}
.main-content > h3 {
    margin: 32px 0 14px;
    font-size: 20px;
    color: var(--navy);
}
.main-content > .table-wrap {
    margin-bottom: 24px;
}
.main-area > :not(.topbar):not(.main-content) {
    margin: 24px 36px;
}

@media(max-width:900px){
    .main-content {
        padding: 24px;
    }
    .main-area > :not(.topbar):not(.main-content) {
        margin: 20px 24px;
    }
}
@media(max-width:640px){
    .main-content {
        padding: 18px 14px 36px;
    }
    .main-area > :not(.topbar):not(.main-content) {
        margin: 16px 14px;
    }
}

/* Media Uploads, News Gallery & PDF Viewer */
.cover-preview-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #f8fbfd;
    border: 1px solid #e1ebf4;
    border-radius: 8px;
}
.cover-preview-box img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd9e6;
}
.pdf-preview-box {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #faecc8;
    border-radius: 8px;
    font-size: 15px;
}
.admin-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin: 12px 0 6px;
}
.admin-gallery-item {
    border: 1px solid #dbe6f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    padding: 6px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(10,50,90,.04);
}
.admin-gallery-item img {
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.admin-gallery-item label {
    display: block;
    font-size: 13px;
    color: var(--red);
    margin-top: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Public News Gallery */
.news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.gallery-thumb-link {
    position: relative;
    display: block;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f0f6fa;
    box-shadow: 0 4px 12px rgba(10,50,90,.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-thumb-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(10,50,90,.14);
}
.gallery-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-zoom-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(6, 59, 112, .85);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .2s;
}
.gallery-thumb-link:hover .gallery-zoom-badge {
    opacity: 1;
}

/* Public PDF Viewer & Attachment Card */
.pdf-attachment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: #fdfdfd;
    border: 1px solid #d5e5f3;
    border-left: 5px solid #d43838;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(10,50,90,.04);
}
.pdf-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pdf-icon {
    font-size: 34px;
    line-height: 1;
}
.pdf-info strong {
    display: block;
    font-size: 16px;
    color: var(--navy);
}
.pdf-info small {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}
.pdf-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* News & Media Pages - 95% Screen Width */
.container.news-wide-mode,
.container:has(.news-page-container),
.container:has(.downloads-page-container) {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
}

.news-page-container,
.downloads-page-container {
    width: 95%;
    max-width: 95vw;
    margin: 0 auto;
    box-sizing: border-box;
}

.news-detail-card {
    width: 100%;
    max-width: 100%;
    margin: 24px auto;
    padding: clamp(20px, 3.5vw, 40px);
    box-sizing: border-box;
}

.news-detail-cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 16px rgba(10,50,90,.08);
}

.news-detail-body {
    line-height: 1.9;
    font-size: 16px;
    color: #2c3e50;
    margin-top: 20px;
    white-space: pre-line;
}

.news-grid-95 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

@media (max-width: 640px) {
    .news-page-container {
        width: 95%;
        margin: 0 auto;
    }
    .news-grid-95 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-detail-card {
        padding: 16px;
        margin: 16px auto;
    }
    .news-detail-cover {
        max-height: 280px;
        margin: 14px 0;
    }
}

/* Navigation Menu Manager */
.table td code {
    background: #f1f6fb;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #dce8f2;
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.table td .btn-reorder {
    padding: 1px 5px;
    line-height: 1.1;
    font-size: 11px;
    background: #f4f8fb;
    border: 1px solid #c9dbe9;
    border-radius: 4px;
    color: #1b5280;
    display: inline-block;
    text-align: center;
    transition: all .15s ease;
}
.table td .btn-reorder:hover {
    background: #0874d1;
    color: #fff;
    border-color: #0874d1;
    transform: none;
}

/* Downloads Section - 95% Screen Width Components */
.downloads-filter-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.downloads-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.download-cat-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #d0dfed;
    background: #f4f8fc;
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.download-cat-btn:hover {
    background: #e1effa;
    border-color: #a4c9ea;
    color: var(--blue);
}

.download-cat-btn.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
    box-shadow: 0 2px 8px rgba(10,38,71,.25);
}

.download-search-input {
    min-width: 260px;
    max-width: 380px;
    flex: 1;
}

.downloads-grid-95 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.download-card-95 {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 8px rgba(10,50,90,.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all .2s ease;
}

.download-card-95:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10,50,90,.09);
    border-color: #adcde8;
}

.download-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.pdf-icon-badge {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    border-radius: 10px;
    width: 46px;
    height: 46px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-card-info {
    flex: 1;
}

.download-card-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.4;
}

.download-card-info p {
    margin: 0 0 8px;
    font-size: 15px;
    color: #4b637a;
    line-height: 1.5;
}

.download-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--muted);
}

.download-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #edf2f7;
    padding-top: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-dl-primary {
    background: linear-gradient(135deg, #0874d1 0%, #064784 100%);
    color: #ffffff !important;
    border: 1px solid #053b6e;
    border-radius: 9px;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(8, 116, 209, 0.22);
    transition: all .18s ease;
}

.btn-dl-primary:hover {
    background: linear-gradient(135deg, #065fa9 0%, #043663 100%);
    box-shadow: 0 6px 18px rgba(6, 71, 132, 0.32);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-dl-secondary {
    background: #f0f6fc;
    color: #0874d1 !important;
    border: 1px solid #cce3f5;
    border-radius: 9px;
    padding: 9px 15px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    text-decoration: none;
    transition: all .18s ease;
}

.btn-dl-secondary:hover {
    background: #e1effa;
    border-color: #a4c9ea;
    color: #064784 !important;
    transform: translateY(-1px);
}

.downloads-notice-card {
    background: linear-gradient(135deg, #f8fbfe 0%, #eef5fc 100%);
    border: 1px solid #cce2f5;
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 24px;
}

.downloads-notice-card h4 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.downloads-notice-card ol {
    margin: 0;
    padding-left: 22px;
    color: #334d66;
    line-height: 1.8;
    font-size: 15.5px;
}

@media (max-width: 768px) {
    .downloads-grid-95 {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .downloads-filter-card {
        flex-direction: column;
        align-items: stretch;
    }
    .download-search-input {
        max-width: 100%;
        min-width: 100%;
    }
}

/* Hero Banner Solid White Buttons with Navy Text */
.btn-hero-white {
    background: #ffffff !important;
    color: #0754a0 !important;
    border: 1px solid #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.btn-hero-white:hover {
    background: #f0f7fc !important;
    color: #053b70 !important;
    border-color: #f0f7fc !important;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
}

/* CMS Cover Banner (for regulations and featured pages) */
.cms-cover-banner {
    margin: 16px 0 24px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    border: 1px solid var(--line);
    text-align: center;
}
.cms-cover-banner img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}
.cms-cover-banner:hover img {
    transform: scale(1.015);
}

/* Regulations Listing Cards on CMS Page */
.regulations-listing-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.reg-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.reg-search-input {
    flex: 1;
    max-width: 380px;
    min-width: 240px;
}
.regulations-cards-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.reg-item-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(10, 50, 90, 0.04);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}
.reg-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 50, 90, 0.08);
    border-color: #adcde8;
}
.reg-item-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}
.reg-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}
.reg-item-text {
    flex: 1;
    min-width: 0;
}
.reg-item-title {
    margin: 0 0 4px;
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.4;
}
.reg-item-title a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s ease;
}
.reg-item-title a:hover {
    color: var(--blue);
}
.reg-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    flex-wrap: wrap;
}
.reg-thumb-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.reg-item-thumb {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
    border: 2px solid var(--gold) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.2s ease;
    cursor: pointer;
    vertical-align: middle;
}
.reg-thumb-link:hover .reg-item-thumb {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}
.reg-item-placeholder-badge {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 10px;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.reg-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    flex-wrap: wrap;
}
.reg-item-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .reg-item-main-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .reg-item-actions {
        width: 100%;
        justify-content: flex-start;
        padding-top: 10px;
        border-top: 1px dashed #e2e8f0;
    }
    .reg-search-input {
        max-width: 100%;
    }
}

/* ==========================================================================
   HOMEPAGE HORIZONTAL POPUP (ป็อปอัปหน้าแรกแนวนอน)
   ========================================================================== */
.portal-home-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.portal-home-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.portal-home-popup-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 98vh;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.portal-home-popup-overlay.show .portal-home-popup-container {
    transform: scale(1);
}
.portal-home-popup-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}
.portal-home-popup-close:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: scale(1.1);
}
.portal-home-popup-media {
    display: block;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
    background: #000;
    max-width: 95vw;
    text-align: center;
    text-decoration: none;
}
.portal-home-popup-img {
    display: block;
    width: auto;
    max-width: 95vw;
    max-height: var(--popup-h, 75vh);
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: filter 0.2s ease;
}
a.portal-home-popup-media:hover .portal-home-popup-img {
    filter: brightness(1.03);
}
.portal-home-popup-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    padding: 8px 18px;
    background: rgba(15, 23, 42, 0.88);
    border-radius: 30px;
    color: #e2e8f0;
    font-size: 13px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    gap: 12px;
}
.portal-home-popup-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    color: #cbd5e1;
}
.portal-home-popup-checkbox-label input {
    cursor: pointer;
    accent-color: #0874d1;
    width: 16px;
    height: 16px;
}
.portal-home-popup-btn-close {
    background: #334155;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.portal-home-popup-btn-close:hover {
    background: #475569;
    color: #fff;
}
@media (max-width: 600px) {
    .portal-home-popup-close {
        top: -12px;
        right: -8px;
        width: 32px;
        height: 32px;
    }
    .portal-home-popup-bar {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-radius: 16px;
    }
}

/* Financial Status Reports Section (รายงานสถานะการเงินและทรัพย์สิน) */
.finance-report-section {
    margin: 32px 0 28px;
    width: 100%;
    box-sizing: border-box;
}
.finance-report-card {
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(18, 52, 86, 0.05);
    overflow: hidden;
}
.finance-report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #edf2f6;
    transition: background-color 0.18s ease;
    gap: 16px;
}
.finance-report-row:last-child {
    border-bottom: none;
}
.finance-report-row:hover {
    background-color: #f8fafc;
}
.finance-report-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.finance-report-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0f7fc;
    color: #174871;
    border: 1px solid #d5e5f2;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.finance-report-title-link {
    color: var(--navy, #14375b);
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.45;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}
.finance-report-row:hover .finance-report-title-link {
    color: var(--blue, #0874d1);
}
.finance-report-badge-pdf {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 7px;
    flex-shrink: 0;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.finance-report-badge-pdf:hover {
    background: #fca5a5;
    color: #991b1b;
}
.finance-report-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.btn-finance-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--blue, #0874d1);
    border: 1.5px solid var(--blue, #0874d1);
    border-radius: 7px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.18s ease;
    box-shadow: 0 2px 5px rgba(8, 116, 209, 0.08);
}
.btn-finance-read:hover {
    background: var(--blue, #0874d1);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(8, 116, 209, 0.22);
}
@media (max-width: 640px) {
    .finance-report-row {
        padding: 12px 14px;
        gap: 10px;
    }
    .finance-report-left {
        gap: 10px;
    }
    .finance-report-date {
        font-size: 12px;
        padding: 3px 6px;
    }
    .finance-report-title-link {
        font-size: 14px;
    }
    .btn-finance-read {
        padding: 5px 12px;
        font-size: 13px;
    }
}

/* ========================================================
   PERSONNEL & BOARD CARDS SECTION
   ======================================================== */
.personnel-board-section {
    margin-top: 24px;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Row 1: Single Leader Card (Centered) */
.personnel-leader-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    width: 100%;
}

/* Card General: Fixed 15% of Device Screen (15vw) */
.personnel-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 44, 89, 0.06);
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
    width: 15vw;
    box-sizing: border-box;
}
.personnel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(8, 116, 209, 0.12);
    border-color: #cbd5e1;
}

/* Leader Card Specific Styling: Same 15vw fixed width with Gold Accents */
.personnel-card-leader {
    width: 15vw;
    border: 2px solid #e0c375;
    background: linear-gradient(180deg, #fffefb 0%, #ffffff 100%);
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.14);
}
.personnel-card-leader .personnel-name {
    color: var(--navy, #0f2c59);
}
.personnel-card-leader .personnel-position {
    color: #92400e;
    background: #fef3c7;
    font-weight: 700;
}

/* Photo Wrapper: Enforced Proportional Balance with Card Width */
.personnel-photo-wrap {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 9px;
    overflow: hidden;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}
.personnel-card-leader .personnel-photo-wrap {
    border-color: #d4af37;
}
.personnel-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.28s ease;
}
.personnel-photo-wrap:hover img {
    transform: scale(1.05);
}
.personnel-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(26px, 3vw, 48px);
    color: #94a3b8;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    user-select: none;
}

/* Personnel Information */
.personnel-info {
    margin-top: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.personnel-name {
    font-size: clamp(13px, 1.05vw, 16px);
    font-weight: 700;
    color: var(--navy, #0f2c59);
    line-height: 1.35;
    word-break: break-word;
    text-align: center;
}
.personnel-position {
    margin-top: 5px;
    font-size: clamp(11px, 0.85vw, 13px);
    color: #475569;
    line-height: 1.3;
    padding: 3px 8px;
    background: #f1f5f9;
    border-radius: 12px;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    text-align: center;
}

/* Personnel Grid Layouts: Fixed 15vw per column, Centered */
.personnel-grid {
    display: grid;
    gap: 18px;
    justify-content: center;
    width: 100%;
}
.personnel-grid.cols-1 {
    grid-template-columns: repeat(1, 15vw);
}
.personnel-grid.cols-2 {
    grid-template-columns: repeat(2, 15vw);
}
.personnel-grid.cols-3 {
    grid-template-columns: repeat(3, 15vw);
}
.personnel-grid.cols-4 {
    grid-template-columns: repeat(4, 15vw);
}
.personnel-grid.cols-5 {
    grid-template-columns: repeat(5, 15vw);
}

/* Responsive Breakpoints for Tablet & Mobile */
@media (max-width: 1400px) {
    .personnel-grid.cols-5 {
        grid-template-columns: repeat(4, 15vw);
    }
}
@media (max-width: 1100px) {
    .personnel-grid.cols-4,
    .personnel-grid.cols-5 {
        grid-template-columns: repeat(3, 15vw);
    }
}
@media (max-width: 850px) {
    .personnel-grid.cols-3,
    .personnel-grid.cols-4,
    .personnel-grid.cols-5 {
        grid-template-columns: repeat(2, 15vw);
    }
}
@media (max-width: 680px) {
    .personnel-card,
    .personnel-card-leader {
        width: clamp(140px, 42vw, 190px);
    }
    .personnel-grid.cols-1 {
        grid-template-columns: repeat(1, clamp(140px, 42vw, 190px));
        gap: 12px;
    }
    .personnel-grid.cols-2,
    .personnel-grid.cols-3,
    .personnel-grid.cols-4,
    .personnel-grid.cols-5 {
        grid-template-columns: repeat(2, clamp(140px, 42vw, 190px));
        gap: 12px;
    }
}
@media (max-width: 480px) {
    .personnel-card,
    .personnel-card-leader {
        width: 100%;
        max-width: 220px;
    }
    .personnel-grid.cols-1,
    .personnel-grid.cols-2,
    .personnel-grid.cols-3,
    .personnel-grid.cols-4,
    .personnel-grid.cols-5 {
        grid-template-columns: repeat(1, minmax(0, 220px));
        justify-content: center;
    }
}

/* ========================================================
   ADMIN PERSONNEL CARDS MANAGER STYLES
   ======================================================== */
.admin-personnel-card-item {
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}
.admin-personnel-card-item:hover {
    border-color: #b0c9e0;
    box-shadow: 0 4px 12px rgba(8, 116, 209, 0.08);
}
.admin-personnel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-personnel-card-body {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 800px) {
    .admin-personnel-card-body {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   HOMEPAGE 4x2 ACTIVITIES GRID & CARDS
   ======================================================== */
.activity-cards-4x2-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.activity-item-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(10, 50, 90, 0.04);
    transition: transform 0.22s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.22s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.22s ease;
    padding: 0;
    cursor: pointer;
    position: relative;
}

/* ACTIVE STATE WHEN MOUSE HOVERS / FOCUSES ON CARD */
.activity-item-card:hover,
.activity-item-card.active,
.activity-item-card:focus-within {
    transform: translateY(-7px);
    box-shadow: 0 14px 28px rgba(8, 116, 209, 0.16), 0 0 0 2px var(--blue, #0874d1);
    border-color: var(--blue, #0874d1);
    z-index: 2;
}

.activity-card-img-link {
    display: block;
    position: relative;
    width: 100%;
    height: 200px; /* Same 200px as public/?page=public&section=activities */
    background: #e2ebf3;
    overflow: hidden;
    text-decoration: none;
}
.activity-card-img-link img {
    width: 100%;
    height: 200px; /* Same 200px as public/?page=public&section=activities */
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.activity-item-card:hover .activity-card-img-link img,
.activity-item-card.active .activity-card-img-link img {
    transform: scale(1.06);
    filter: brightness(1.03);
}
.activity-card-noimg {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b3d6c 0%, #29538c 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    padding: 14px;
}
.activity-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(20, 55, 91, 0.88);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.activity-item-card:hover .activity-card-badge,
.activity-item-card.active .activity-card-badge {
    background: var(--blue, #0874d1);
    box-shadow: 0 3px 8px rgba(8, 116, 209, 0.4);
}
.activity-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.activity-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 8px;
}
.activity-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 8px;
}
.activity-card-title a {
    color: var(--navy);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}
.activity-item-card:hover .activity-card-title a,
.activity-item-card.active .activity-card-title a {
    color: var(--blue, #0874d1);
}
.activity-card-desc {
    font-size: 13px;
    color: #556980;
    line-height: 1.45;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.activity-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}
.activity-card-footer .btn {
    transition: all 0.2s ease;
}
.activity-item-card:hover .activity-card-footer .btn,
.activity-item-card.active .activity-card-footer .btn {
    background: var(--blue, #0874d1);
    color: #ffffff;
    border-color: var(--blue, #0874d1);
    box-shadow: 0 4px 10px rgba(8, 116, 209, 0.25);
}
.activity-pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .activity-cards-4x2-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 600px) {
    .activity-cards-4x2-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .activity-card-img-link,
    .activity-card-img-link img,
    .activity-card-noimg {
        height: 200px;
    }
}







