@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;500;600;700;800&display=swap');:root{--red:#8b1616;--deep:#650e0b;--cream:#f6e8ce;--ink:#30251b}html{scroll-behavior:smooth}body{background:#f8edd9;color:var(--ink);font-family:'Noto Serif',Georgia,serif;background-image:radial-gradient(#8c4c1d13 1px,transparent 1px);background-size:17px 17px}a{color:var(--red)}.dg-header{background:#fff7e9;border-bottom:1px solid #c8a477;position:relative;z-index:3}.dg-header-inner{max-width:1280px;margin:auto;display:flex;align-items:center;gap:24px;padding:10px 24px;min-height:80px}.dg-brand,.dg-footer-brand{display:flex;align-items:center;gap:12px;text-decoration:none;flex-shrink:0}.dg-brand img{height:59px;width:59px;object-fit:cover;border:1px solid #a94531}.dg-brand strong,.dg-footer-brand strong{font-size:25px;color:var(--red);display:block;line-height:1.1}.dg-brand small,.dg-footer-brand small{font-size:13px;color:var(--ink);letter-spacing:1px}.dg-nav{display:flex;gap:19px;align-items:center;flex:1;justify-content:center}.dg-nav a{text-decoration:none;color:#271c13;font-size:13px;white-space:nowrap}.dg-nav a:hover{color:var(--red)}.dg-account{display:flex;align-items:center;gap:8px}.dg-account a,.dg-account button{background:none;border:1px solid var(--red);color:var(--red);padding:8px 10px;border-radius:5px;text-decoration:none;font-size:12px;white-space:nowrap}.dg-menu-toggle{display:none}.dg-main{max-width:1280px;margin:auto;background:#f7ebd6}.dg-hero{display:grid;grid-template-columns:46% 54%;min-height:465px;background:linear-gradient(90deg,#f5e6c9,#f7ead6)}.dg-hero-copy{padding:75px 30px 48px 7%;position:relative;background:radial-gradient(ellipse at 0 0,#a74e261c,transparent 70%)}.dg-eyebrow{letter-spacing:4px;font-size:11px;color:var(--red)}.dg-hero h1{font-size:clamp(60px,7vw,100px);line-height:1.2;color:var(--red);font-weight:800;margin:14px 0 6px}.dg-hero h2{font-size:24px;line-height:1.35;font-weight:500;margin:0 0 16px}.dg-hero p{max-width:460px;font-size:14px;line-height:1.9}.dg-hero-photo{background-image:linear-gradient(90deg,#f7ead6 0%,#f7ead600 22%),url('o-quan-chuong-reference.jpg');background-position:center;background-size:cover;min-height:390px}.dg-search{display:flex;align-items:center;background:#fff9ed;border:1px solid #d6b995;padding:6px;border-radius:40px;margin-top:26px;box-shadow:0 8px 25px #542b151f;max-width:475px}.dg-search input{border:0;outline:0;background:transparent;min-width:0;flex:1;padding:9px 14px;font-size:12px;font-family:inherit}.dg-search button,.dg-red-button{border:0;background:var(--red);color:#fff;border-radius:30px;padding:11px 21px;font-size:12px;text-decoration:none;white-space:nowrap}.dg-shortcuts{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;padding:22px 4%;background:linear-gradient(#f5e7ce,#e8cfaa)}.dg-shortcuts a{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;text-decoration:none;color:#271a10;padding:20px 5px 15px;min-height:165px;border:1px solid #d4aa7a;border-radius:7px;background:linear-gradient(145deg,#fff5df,#efd8b5);box-shadow:0 3px 9px #693a1925}.dg-shortcuts a span{font-size:37px;color:var(--red);line-height:1}.dg-shortcuts strong{font-size:19px}.dg-shortcuts small{font-size:10px}.dg-shortcuts em{font-style:normal;border:1px solid var(--red);border-radius:50%;color:var(--red);height:23px;width:23px;line-height:19px;font-size:19px}.dg-stats{background:linear-gradient(135deg,#5c0d09,#8c1711 55%,#5b0b09);color:#f8e4b9;padding:30px 7% 37px;text-align:center}.dg-stats h2{font-size:24px;margin:0 0 27px}.dg-stat-grid{display:grid;grid-template-columns:repeat(4,1fr)}.dg-stat-grid>div{display:flex;flex-direction:column;gap:5px;border-right:1px solid #ffffff38}.dg-stat-grid>div:last-child{border:0}.dg-stat-grid span{font-size:30px}.dg-stat-grid strong{font-size:35px;font-weight:500}.dg-stat-grid small{font-size:14px}.dg-about{display:grid;grid-template-columns:1fr 1fr;gap:45px;align-items:center;padding:60px 5%}.dg-about-photo img{width:100%;height:315px;object-fit:cover;border-radius:7px;border:8px solid #fff4dd;box-shadow:0 8px 25px #492b1429}.dg-about h2,.dg-featured h2{color:var(--red);font-size:27px;font-weight:700;margin:10px 0 19px}.dg-about p{font-size:14px;line-height:2}.dg-red-button{display:inline-block;margin-top:12px}.dg-featured{padding:28px 5% 52px;background:#f4e3c7}.dg-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.dg-section-heading a{font-size:13px}.dg-featured-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:15px}.dg-person{text-decoration:none;color:var(--ink);background:#fff1d9;border-radius:7px;overflow:hidden;text-align:center;padding-bottom:16px;display:flex;flex-direction:column;gap:8px}.dg-avatar{height:150px;background:linear-gradient(135deg,#c9b69b,#8d7762);display:grid;place-items:center;color:#fff1dc;font-size:75px}.dg-person strong{font-size:14px;padding:0 7px}.dg-person small{font-size:12px}.dg-empty{font-size:14px}.dg-footer{background:#640e0b;color:#f4dec0}.dg-footer-inner{max-width:1200px;margin:auto;display:grid;grid-template-columns:2fr 1fr 1.4fr;gap:50px;padding:45px 25px}.dg-footer-brand img{width:57px;height:57px;object-fit:cover}.dg-footer-brand strong,.dg-footer-brand small{color:#f4dec0}.dg-footer p{font-style:italic;margin-top:20px;font-size:15px}.dg-footer-inner>div:not(:first-child){display:flex;flex-direction:column;gap:9px;font-size:13px}.dg-footer a{color:#f4dec0;text-decoration:none}.dg-copyright{text-align:center;padding:14px;font-size:11px;border-top:1px solid #ffffff20}.dg-main>.container,.dg-main>.container-fluid{padding-top:25px;padding-bottom:25px}.btn-success{background:var(--red);border-color:var(--red)}.btn-success:hover{background:var(--deep);border-color:var(--deep)}.card{border-color:#dcc19b}h1,h2,h3{font-family:'Noto Serif',Georgia,serif}.tree-children{display:flex;flex-wrap:wrap;gap:15px}.tree-node{min-width:170px}.tree-parent{border-left:2px solid #c7a578;padding-left:15px}@media(max-width:1000px){.dg-header-inner{gap:12px}.dg-nav{gap:9px}.dg-nav a{font-size:11px}.dg-hero-copy{padding-top:50px}.dg-hero h1{font-size:60px}}@media(max-width:760px){.dg-header-inner{min-height:72px;padding:8px 14px;flex-wrap:wrap}.dg-brand img{width:50px;height:50px}.dg-brand strong{font-size:22px}.dg-brand small{font-size:11px}.dg-menu-toggle{display:block;margin-left:auto;border:0;background:transparent;color:var(--red);font-size:27px}.dg-nav{display:none;order:3;flex-basis:100%;flex-direction:column;align-items:stretch;padding:12px 0;gap:0}.dg-nav.is-open{display:flex}.dg-nav a{padding:11px;border-bottom:1px solid #dec9a9;font-size:14px}.dg-account{order:4;flex-basis:100%;display:none;padding-bottom:10px}.dg-nav.is-open+.dg-account{display:flex}.dg-hero{display:flex;flex-direction:column}.dg-hero-photo{order:0;min-height:300px;background-image:url('o-quan-chuong-reference.jpg')}.dg-hero-copy{order:1;padding:28px 6% 36px;text-align:center}.dg-hero h1{font-size:60px}.dg-hero h2{font-size:19px}.dg-hero p{font-size:13px;margin:auto}.dg-search{margin:22px auto 0}.dg-shortcuts{grid-template-columns:repeat(2,1fr);gap:10px;padding:15px}.dg-shortcuts a{min-height:145px;padding:15px 5px}.dg-shortcuts a:last-child{grid-column:1/-1}.dg-shortcuts strong{font-size:16px}.dg-stats{padding:24px 10px}.dg-stats h2{font-size:19px}.dg-stat-grid span{font-size:22px}.dg-stat-grid strong{font-size:25px}.dg-stat-grid small{font-size:10px}.dg-about{grid-template-columns:1fr;gap:25px;padding:35px 6%}.dg-about-photo img{height:235px}.dg-about h2,.dg-featured h2{font-size:21px}.dg-featured{padding:25px 5%}.dg-featured-grid{grid-template-columns:repeat(2,1fr)}.dg-avatar{height:125px}.dg-footer-inner{grid-template-columns:1fr 1fr;gap:20px}.dg-footer-inner>div:first-child{grid-column:1/-1}}
/* Heritage Edition v3 – design refinements. All existing routes/forms remain intact. */
:root{--red:#8d1516;--deep:#590c0a;--gold:#d5a55e;--paper:#f6e9d2}
body{background-color:#efe0c5;background-image:radial-gradient(circle at 25% 18%,#fff6e7 0,transparent 44%),repeating-linear-gradient(16deg,#8e54200a 0 1px,transparent 1px 5px);}
.dg-header{background:#fff5e5eF;box-shadow:0 4px 24px #5b240d14;backdrop-filter:blur(12px);position:sticky;top:0}
.dg-header-inner{min-height:84px}
.dg-brand img,.dg-footer-brand img{object-fit:contain;background:#fff8ec;border:0;border-radius:2px;padding:2px}
.dg-nav a{position:relative;transition:color .2s}
.dg-nav a:after{content:"";position:absolute;left:0;right:100%;height:1px;bottom:-8px;background:var(--red);transition:right .25s}
.dg-nav a:hover:after{right:0}
.dg-main{box-shadow:0 0 50px #60351414;background:#f6e9d4}
.dg-hero{position:relative;isolation:isolate;min-height:530px;overflow:hidden;grid-template-columns:49% 51%;background:linear-gradient(120deg,#f7e8d0,#ecd0a8)}
.dg-hero:before,.dg-about:before,.dg-featured:before{content:"";position:absolute;inset:0;pointer-events:none;background-image:repeating-linear-gradient(90deg,#80512209 0 1px,transparent 1px 6px),radial-gradient(#88481e15 .7px,transparent .7px);background-size:auto,13px 13px;opacity:.7}
.dg-blossom{position:absolute;z-index:2;top:0;left:-15px;width:350px;height:200px;background:url('flower.svg') left top/contain no-repeat;pointer-events:none;opacity:.8}
.dg-hero-copy{z-index:2;padding:105px 10px 75px 8%;background:transparent}
.dg-hero h1{font-size:clamp(67px,7vw,104px);letter-spacing:1px;text-shadow:1px 2px 0 #fff2d8}
.dg-hero h2{font-size:23px;line-height:1.55}
.dg-hero p{max-width:430px}
.dg-hero-photo{min-height:530px;background-image:linear-gradient(90deg,#f3dfbe 0%,#f3dfbed8 5%,#f3dfbe5e 20%,transparent 39%),linear-gradient(0deg,#7d25181a,transparent 25%),url('o-quan-chuong-clean-crop.jpg');background-position:center,center,center 46%;background-size:cover;filter:saturate(.89) sepia(.09)}
.dg-search{position:relative;z-index:3;box-shadow:0 10px 24px #6d2c1325;transition:box-shadow .25s}
.dg-search:focus-within{box-shadow:0 0 0 3px #ad442c32,0 10px 24px #6d2c1325}
.dg-search button,.dg-red-button{background:linear-gradient(145deg,#9e1c1d,#750f11);transition:transform .2s,box-shadow .2s}
.dg-search button:hover,.dg-red-button:hover{color:white;transform:translateY(-2px);box-shadow:0 7px 18px #75101436}
.dg-shortcuts{position:relative;z-index:2;gap:14px;padding:25px 4% 30px;background:linear-gradient(180deg,#f3dfc1,#e8cba5)}
.dg-shortcuts a{position:relative;overflow:hidden;border:1px solid #cda675;background:radial-gradient(circle at 20% 10%,#fff7e6,#f1d7b0);box-shadow:0 8px 17px #66330c20,inset 0 0 0 5px #fff9ed55;transition:transform .25s,box-shadow .25s;min-height:174px}
.dg-shortcuts a:before{content:"";position:absolute;inset:7px;border:1px solid #bb88564d;pointer-events:none}
.dg-shortcuts a:hover{transform:translateY(-5px);box-shadow:0 14px 25px #66330c2e,inset 0 0 0 5px #fff9ed55}
.dg-shortcuts a span{color:#961a17;text-shadow:0 1px 0 #e2b77b}
.dg-shortcuts em{margin-top:auto}
.dg-stats{position:relative;overflow:hidden;padding:36px 7% 42px;background:radial-gradient(ellipse at 55% 30%,#951d16,#6b0e0b 73%);border-top:3px solid #d3a260;border-bottom:3px solid #d3a260}
.dg-stats:before{content:"";position:absolute;inset:0;opacity:.24;background-image:repeating-radial-gradient(circle at 5% 130%,transparent 0 13px,#e7b66e 14px 15px,transparent 16px 26px)}
.dg-stats-cloud{position:absolute;inset:auto 0 0;height:135px;background:url('clouds.svg') center bottom/cover no-repeat;opacity:.55}
.dg-stats h2,.dg-stat-grid{position:relative;z-index:1}
.dg-stats h2{letter-spacing:1.2px;color:#ffdfa6}
.dg-stat-grid strong{font-size:38px;color:#ffe0a6}
.dg-about{position:relative;overflow:hidden;padding:75px 5%;background:linear-gradient(140deg,#fff2dc,#f3e0c3)}
.dg-about>*{position:relative;z-index:1}
.dg-about-photo{position:relative;padding:9px;background:#fff5e3;box-shadow:0 12px 30px #5c2b0d26;transform:rotate(-.7deg)}
.dg-about-photo:after{content:"";position:absolute;inset:16px;border:1px solid #d1a5757a;pointer-events:none}
.dg-about-photo img{height:335px;border:0;box-shadow:none;filter:saturate(.82) sepia(.13)}
.dg-about h2,.dg-featured h2{letter-spacing:.3px}
.dg-featured{position:relative;padding:39px 5% 60px;background:linear-gradient(180deg,#efd5b1,#f6e6cd)}
.dg-featured>*{position:relative;z-index:1}
.dg-person{border:1px solid #d9b88b;box-shadow:0 8px 18px #62370d16;transition:transform .25s,box-shadow .25s}
.dg-person:hover{transform:translateY(-4px);box-shadow:0 12px 24px #62370d2c}
.dg-avatar{background:linear-gradient(145deg,#d2c1a5,#8e7963);font-size:65px}
.dg-footer{position:relative;overflow:hidden;background:radial-gradient(ellipse at 45% 0,#821710,#540b09 85%);border-top:3px solid #b9844d}
.dg-footer:before{content:"";position:absolute;left:0;right:0;bottom:20px;height:140px;opacity:.25;background:url('clouds.svg') center bottom/cover no-repeat;pointer-events:none}
.dg-footer-inner,.dg-copyright{position:relative}
@media(max-width:760px){.dg-header{position:relative}.dg-hero{display:flex;flex-direction:column;min-height:0}.dg-hero-photo{order:0;min-height:330px;background-image:linear-gradient(0deg,#f3dfbe 0%,transparent 30%),url('o-quan-chuong-clean-crop.jpg');background-position:center,center 42%;background-size:cover}.dg-hero-copy{order:1;text-align:center;padding:25px 6% 40px}.dg-blossom{width:190px;height:115px;top:310px;opacity:.4}.dg-hero h1{font-size:60px}.dg-shortcuts{padding:14px;gap:10px}.dg-shortcuts a{min-height:152px}.dg-stats{padding:30px 12px}.dg-stat-grid strong{font-size:26px}.dg-about{padding:43px 6%;gap:25px}.dg-about-photo img{height:260px}.dg-featured{padding:30px 5% 45px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.dg-shortcuts a,.dg-person,.dg-search button,.dg-red-button{transition:none}}

/* Gia Pha So v4 – approved heritage assets; presentation-only overrides */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');
:root{--dg-font:'Lora',Georgia,serif}
html,body,button,input,textarea,select{font-family:var(--dg-font)}
h1,h2,h3,h4,h5,.dg-brand strong,.dg-footer-brand strong{font-family:var(--dg-font)}
body{background-color:#e9d6b7;background-image:url('backgrounds/BG-01-paper-inkwash.webp');background-size:1100px auto;background-attachment:fixed}
.dg-header{background:#fff4e3ef}
.dg-main{background:#f7e8d1 url('backgrounds/BG-01-paper-inkwash.webp') center top/100% auto repeat-y}
.dg-hero{background:transparent url('backgrounds/BG-01-paper-inkwash.webp') left top/cover no-repeat}
.dg-hero:before{background:none}
.dg-hero-photo{background-image:linear-gradient(90deg,#f6e8d4 0%,#f6e8d4b8 8%,transparent 35%),url('backgrounds/BG-02-hero-gate.webp');background-size:cover;background-position:center}
.dg-shortcuts{background:linear-gradient(180deg,#f2dfc6d9,#a9442922),url('backgrounds/BG-01-paper-inkwash.webp') center/cover}
.dg-shortcuts a{background:#f8e7ce url('backgrounds/BG-04-card-parchment.webp') center/100% 100% no-repeat;border-color:#b9825b66;box-shadow:0 6px 18px #4c2c1924}
.dg-shortcuts a:before{border:0}
.dg-shortcuts .dg-icon{display:flex;align-items:center;justify-content:center;height:58px;width:75px;line-height:normal}
.dg-shortcuts .dg-icon img{height:57px;width:70px;object-fit:contain;display:block}
.dg-stats{background:#6c0e0b url('backgrounds/BG-03-red-lacquer.webp') center bottom/cover no-repeat}
.dg-stats:before{display:none}
.dg-stats-cloud{display:none}
.dg-stat-icon{height:39px;display:flex;align-items:center;justify-content:center}
.dg-stat-icon img{height:36px;width:42px;object-fit:contain;filter:brightness(0) saturate(100%) invert(88%) sepia(24%) saturate(466%) hue-rotate(340deg) brightness(104%)}
.dg-about{background:#f8e9d2 url('backgrounds/BG-01-paper-inkwash.webp') center/cover no-repeat}
.dg-about:before{background:none}
.dg-about-photo{padding:0;background:transparent;box-shadow:none;transform:none}
.dg-about-photo:after{display:none}
.dg-about-photo img{border:0;box-shadow:none;object-fit:cover;mask-image:radial-gradient(ellipse 73% 69% at center,#000 67%,transparent 100%);-webkit-mask-image:radial-gradient(ellipse 73% 69% at center,#000 67%,transparent 100%)}
.dg-featured{background:#f6e6ce url('backgrounds/BG-01-paper-inkwash.webp') center/cover no-repeat}
.dg-featured:before{background:none}
.dg-footer{background:#650c0a url('backgrounds/BG-03-red-lacquer.webp') center bottom/cover no-repeat}
.dg-footer:before{display:none}
.dg-shortcuts a:focus-visible,.dg-nav a:focus-visible,.dg-search button:focus-visible{outline:3px solid #d5a55e;outline-offset:3px}
@media(max-width:760px){body{background-attachment:scroll}.dg-hero{display:flex;flex-direction:column}.dg-hero-copy{order:0;text-align:left;padding:36px 6% 24px}.dg-hero-photo{order:1;min-height:260px;background-image:linear-gradient(0deg,#f4e2c9 0%,transparent 27%),url('backgrounds/BG-02-hero-gate.webp');background-size:cover;background-position:center 43%}.dg-blossom{top:0}.dg-search{margin:22px 0 0}.dg-shortcuts .dg-icon{height:47px}.dg-shortcuts .dg-icon img{height:46px}.dg-stats{background-size:auto 100%}}


/* =============================================================
   DO GIA v4.1 - Heritage refinement (visual only)
   No route, controller, session, form or database modifications.
   ============================================================= */
:root { --dg-paper-rgb: 247,235,215; }
html { background: #f4e7d1; }
body {
  background-color: #f4e7d1;
  background-image: linear-gradient(rgba(250,241,224,.70),rgba(250,241,224,.70)), url('backgrounds/BG-01-paper-inkwash.webp');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* Avoid repeated BG-01 at every section and avoid a hard-edged center panel. */
.dg-main { max-width: none; width: 100%; background: transparent; box-shadow: none; }
.dg-header {
  background: rgba(249,239,222,.88);
  border-bottom: 1px solid rgba(133,76,45,.18);
  box-shadow: 0 3px 18px rgba(85,43,20,.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.dg-header-inner { max-width: 1280px; min-height: 76px; }
.dg-nav a { font-family: var(--dg-font); color: #50352b; }
.dg-nav a:hover { color: var(--red); }
.dg-account a, .dg-account button { background: rgba(255,249,239,.42); }
/* A single hero painting. Fade the gate image into the same paper tone. */
.dg-hero {
  max-width: 1440px;
  margin-inline: auto;
  grid-template-columns: 49% 51%;
  background: transparent;
  min-height: 530px;
  isolation: isolate;
}
.dg-hero::before { display: none; }
.dg-hero-copy {
  padding: 95px 24px 68px clamp(28px,5.5vw,95px);
  background: linear-gradient(90deg,rgba(248,235,211,.58),rgba(248,235,211,.24) 82%,transparent);
  z-index: 2;
}
.dg-hero-photo {
  min-height: 530px;
  background-image: url('backgrounds/BG-02-hero-gate.webp');
  background-size: cover;
  background-position: center 46%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.30) 12%,#000 34%,#000 95%,rgba(0,0,0,.86) 100%);
  mask-image: linear-gradient(90deg,transparent 0%,rgba(0,0,0,.30) 12%,#000 34%,#000 95%,rgba(0,0,0,.86) 100%);
  filter: saturate(.88) contrast(.95);
}
/* BG-01 already contains blossoms: do not render the second blossom. */
.dg-blossom { display: none; }
.dg-shortcuts {
  max-width: 1440px;
  margin-inline: auto;
  background: linear-gradient(180deg,rgba(248,235,211,.25),rgba(248,235,211,.45));
}
.dg-shortcuts a { background: #f8e7ce url('backgrounds/BG-04-card-parchment.webp') center/100% 100% no-repeat; }
.dg-about {
  max-width: 1440px;
  margin-inline: auto;
  background: rgba(249,238,220,.64);
}
.dg-featured {
  max-width: 1440px;
  margin-inline: auto;
  background: rgba(246,229,203,.67);
}
.dg-stats { background: linear-gradient(rgba(86,9,7,.10),rgba(86,9,7,.10)),url('backgrounds/BG-03-red-lacquer.webp') center/cover no-repeat; }
.dg-footer { background: #650c0a url('backgrounds/BG-03-red-lacquer.webp') center bottom/cover no-repeat; }
/* Inner pages remain legible against the softly painted full-width paper. */
.dg-main > .container, .dg-main > .container-fluid {
  background: rgba(250,242,229,.89);
  border-radius: 6px;
  max-width: 1280px;
}
@media (min-width: 1441px) {
  .dg-hero-copy { padding-left: 90px; }
}
@media (max-width: 760px) {
  body { background-attachment: scroll; background-position: center top; background-size: cover; }
  .dg-header { position: relative; }
  .dg-header-inner { min-height: 70px; }
  .dg-hero { display: flex; flex-direction: column; min-height: auto; }
  .dg-hero-copy {
    order: 0;
    padding: 38px 6% 22px;
    background: rgba(249,237,216,.45);
    text-align: left;
  }
  .dg-hero-photo {
    order: 1;
    min-height: 290px;
    background-position: center 43%;
    -webkit-mask-image: linear-gradient(180deg,transparent 0%,#000 19%,#000 79%,transparent 100%);
    mask-image: linear-gradient(180deg,transparent 0%,#000 19%,#000 79%,transparent 100%);
  }
  .dg-shortcuts { background: rgba(248,235,211,.38); }
  .dg-about, .dg-featured { background: rgba(249,238,220,.76); }
}
/* Gia Pha So v4.2 - Vietnamese Typography Fix */
html,
body,
button,
input,
textarea,
select,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Lora', Georgia, serif !important;
}

/* Gia Pha So v4.2 - Header Typography */

.dg-nav a {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.dg-nav {
    gap: 24px;
}

.dg-account a,
.dg-account button {
    font-size: 14px;
    font-weight: 500;
}

/* Tablet */
@media (min-width: 761px) and (max-width: 1100px) {
    .dg-nav {
        gap: 12px;
    }

    .dg-nav a {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 760px) {
    .dg-nav a {
        font-size: 16px;
    }
}

/* Gia Pha So v4.2 - Statistics refinement */

.dg-stats {
    padding: 42px 7% 48px;
}

.dg-stats h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

.dg-stat-grid > div {
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 170px;
}

.dg-stat-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    line-height: 1.1;
    min-height: 46px;
}

.dg-stat-grid strong {
    font-size: 44px;
    font-weight: 600;
    line-height: 1.2;
}

.dg-stat-grid small {
    font-size: 16px;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-stats {
        padding: 30px 14px 36px;
    }

    .dg-stats h2 {
        font-size: 21px;
    }

    .dg-stat-grid > div {
        min-height: 120px;
        gap: 6px;
    }

    .dg-stat-grid span {
        font-size: 29px;
        min-height: 34px;
    }

    .dg-stat-grid strong {
        font-size: 32px;
    }

    .dg-stat-grid small {
        font-size: 12px;
    }
}

/* Gia Pha So v4.2 - Larger Statistics Icons */

/* Icon dạng ảnh */
.dg-stat-grid span img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain;
}

/* Icon dạng ký tự hoặc font */
.dg-stat-grid > div > span {
    font-size: 60px;
    min-height: 65px;
    line-height: 1;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-stat-grid span img {
        width: 42px !important;
        height: 42px !important;
    }

    .dg-stat-grid > div > span {
        font-size: 42px;
        min-height: 46px;
    }
}

/* =========================================
   DO GIA v4.2 - HERITAGE SOFT CARDS
   Phuong an A: The giay co hoa nen
   ========================================= */

/* Nen khu vuc 5 the */
.dg-shortcuts {
    background: rgba(247, 235, 215, 0.35) !important;
    padding: 24px 4% 32px;
    gap: 18px;
    border: none;
}

/* Loai bo cam giac khung kep */
.dg-shortcuts a {
    background-color: transparent !important;
    border: 1px solid rgba(139, 22, 22, 0.12) !important;
    border-radius: 5px;

    box-shadow:
        0 4px 12px rgba(74, 43, 23, 0.08) !important;

    padding: 20px 10px 18px;
    min-height: 170px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Lam mem anh nen the da duyet
   Khong thay anh, chi phu lop giay mo */
.dg-shortcuts a {
    background-image:
        linear-gradient(
            rgba(255, 249, 238, 0.28),
            rgba(255, 249, 238, 0.28)
        ),
        var(--dg-card-background, none) !important;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Icon giu nguyen */
.dg-shortcuts a img {
    object-fit: contain;
}

/* Tieu de */
.dg-shortcuts strong {
    color: #4b261b;
    font-weight: 600;
    line-height: 1.35;
}

/* Mo ta */
.dg-shortcuts small {
    color: #704b36;
    line-height: 1.5;
}

/* Mui ten */
.dg-shortcuts em {
    border-color: rgba(139, 22, 22, 0.65);
    color: #8b1616;
}

/* Hover nhe */
.dg-shortcuts a:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 18px rgba(74, 43, 23, 0.13) !important;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-shortcuts {
        gap: 12px;
        padding: 18px 14px 25px;
    }

    .dg-shortcuts a {
        min-height: 155px;
        padding: 16px 8px;
    }
}

/* Gia Pha So v4.2 - Hero Logo */

.dg-hero-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 14px 0 12px;
}

.dg-hero-brand .dg-hero-logo {
    display: block;
    width: auto;
    height: clamp(60px, 7vw, 100px);
    max-width: 32%;
    object-fit: contain;
    flex-shrink: 0;
}

.dg-hero-brand h1 {
    margin: 0;
    font-size: clamp(60px, 7vw, 100px);
    line-height: 1;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-hero-brand {
        justify-content: center;
        gap: 12px;
    }

    .dg-hero-brand .dg-hero-logo {
        height: clamp(48px, 12vw, 68px);
    }

    .dg-hero-brand h1 {
        font-size: clamp(42px, 12vw, 60px);
    }
}

/* Gia Pha So v4.2 - Darker Shortcut Cards */

.dg-shortcuts a {
    background-color: #EBD7B8 !important;
    background-image: linear-gradient(
        rgba(235, 215, 184, 0.72),
        rgba(235, 215, 184, 0.72)
    ) !important;

    border: 1px solid rgba(139, 65, 35, 0.24) !important;

    box-shadow:
        0 5px 14px rgba(85, 48, 24, 0.12) !important;
}

.dg-shortcuts a:hover {
    background-color: #E4CAA4 !important;
    box-shadow:
        0 8px 18px rgba(85, 48, 24, 0.17) !important;
}

/* DO GIA v4.2 - Subtle Brocade Card Texture */

.dg-shortcuts a {
    background-color: #EBD7B8 !important;

    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 14px,
            rgba(132, 86, 43, 0.035) 14px,
            rgba(132, 86, 43, 0.035) 15px,
            transparent 15px,
            transparent 29px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0px,
            transparent 14px,
            rgba(132, 86, 43, 0.035) 14px,
            rgba(132, 86, 43, 0.035) 15px,
            transparent 15px,
            transparent 29px
        ) !important;

    background-repeat: repeat;
    border: 1px solid rgba(139, 65, 35, 0.22) !important;
    box-shadow: 0 4px 12px rgba(85, 48, 24, 0.10) !important;
}

.dg-shortcuts a:hover {
    background-color: #E4CAA4 !important;
}

/* DO GIA v4.2 - 5 nen tranh thuy mac da duyet
   Dan vao CUOI public/assets/do-gia/theme.css
   Ghi de quy tac van caro cu, khong sua icon/chu/duong dan. */
.dg-shortcuts a {
    background-color: #f0dec2 !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    border: 1px solid rgba(146, 95, 55, .28) !important;
    border-radius: 8px !important;
    box-shadow: 0 5px 15px rgba(82, 49, 25, .10) !important;
}
.dg-shortcuts a:nth-child(1) { background-image: url('cards/01-gia-pha.webp') !important; }
.dg-shortcuts a:nth-child(2) { background-image: url('cards/02-cay-pha-he.webp') !important; }
.dg-shortcuts a:nth-child(3) { background-image: url('cards/03-phan-mo.webp') !important; }
.dg-shortcuts a:nth-child(4) { background-image: url('cards/04-ngay-gio.webp') !important; }
.dg-shortcuts a:nth-child(5) { background-image: url('cards/05-gioi-thieu.webp') !important; }
/* Anh da co vien trang tri, bo vien CSS phu ben trong */
.dg-shortcuts a::before { display: none !important; }
.dg-shortcuts a:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgba(82, 49, 25, .16) !important;
}
/* Cho icon, chu, nut luon nam tren anh nen */
.dg-shortcuts a > * { position: relative; z-index: 1; }
@media (max-width: 760px) {
    .dg-shortcuts a { background-size: 100% 100% !important; }
}

/* DO GIA v4.2 - Accessible Shortcut Descriptions */

.dg-shortcuts a small {
    font-family: 'Lora', Georgia, serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    color: #59301F !important;
    letter-spacing: 0 !important;
    text-align: center;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-shortcuts a small {
        font-size: 13px !important;
        line-height: 1.45 !important;
    }
}

/* =========================================
   DO GIA v4.2 - PUBLIC SUBPAGE LAYOUT FIX
   Khong anh huong trang chu
   ========================================= */

/* Tat ca trang con, tru trang chu */
.dg-main > :not(.dg-hero):not(.dg-shortcuts):
:not(.dg-stats):not(.dg-about):not(.dg-featured) {
    width: min(100% - 48px, 1200px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Khung noi dung va bang du lieu */
.dg-main > .container,
.dg-main > .container-fluid {
    max-width: 1200px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Bang rong duoc cuon ngang, khong tran man hinh */
.dg-main .table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-main > :not(.dg-hero):not(.dg-shortcuts):
    not(.dg-stats):not(.dg-about):not(.dg-featured) {
        width: calc(100% - 32px);
    }

    .dg-main > .container,
    .dg-main > .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ==========================================
   DO GIA v4.2 - HERITAGE SUBPAGE LAYOUT
   ========================================== */

.dg-main > .dg-subpage {
    width: calc(100% - 48px) !important;
    max-width: 1200px !important;
    margin: 36px auto 60px !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Tiêu đề trang */
.dg-subpage-heading {
    margin-bottom: 24px;
}

.dg-subpage-heading h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.4;
    color: #8B1616;
    margin: 0 0 12px;
}

.dg-subpage-heading p {
    font-size: 16px;
    line-height: 1.8;
    color: #593A2A;
    max-width: 900px;
}

/* Khung nội dung */
.dg-subpage-content {
    width: 100%;
    min-width: 0;
}

.dg-tree-card {
    background: rgba(255, 249, 237, 0.90);
    border: 1px solid rgba(139, 65, 35, 0.20);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(70, 40, 20, 0.07);
    min-width: 0;
    overflow-x: auto;
}

/* Thông báo chưa có dữ liệu */
.dg-empty-message {
    font-size: 16px;
    line-height: 1.7;
    color: #593A2A;
    margin: 0;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-main > .dg-subpage {
        width: calc(100% - 32px) !important;
        margin-top: 24px !important;
        margin-bottom: 40px !important;
    }

    .dg-subpage-heading h1 {
        font-size: 26px;
    }

    .dg-subpage-heading p {
        font-size: 15px;
    }
}

/* DO GIA v4.2 - Shared subpage layout */
.dg-main > .dg-subpage {
  box-sizing: border-box;
  width: calc(100% - 48px) !important;
  max-width: 1200px !important;
  margin: 36px auto 60px !important;
  padding: 0 !important;
  min-width: 0;
}
.dg-subpage .dg-subpage-heading { margin-bottom: 22px; }
.dg-subpage .dg-subpage-heading h1,
.dg-subpage > h1 {
  color: #8b1616;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.35;
}
.dg-subpage .card {
  border-color: rgba(139,65,35,.2);
  background-color: rgba(255,249,237,.93);
  box-shadow: 0 5px 18px rgba(70,40,20,.06);
}
.dg-subpage .table-responsive { max-width: 100%; overflow-x: auto; }
.dg-subpage .table { min-width: 650px; }
.dg-subpage .form-control,
.dg-subpage .form-select { max-width: 100%; }
.dg-subpage .dg-page-toolbar { gap: 12px; flex-wrap: wrap; }
.dg-subpage .dg-page-toolbar h1 { margin-bottom: 0; }
.dg-subpage .modal { color: #30251b; }
@media (max-width: 760px) {
  .dg-main > .dg-subpage {
    width: calc(100% - 32px) !important;
    margin: 24px auto 40px !important;
  }
  .dg-subpage .card.p-4 { padding: 18px !important; }
  .dg-subpage .dg-page-toolbar { align-items: flex-start !important; }
  .dg-subpage .dg-page-toolbar h1 { width: 100%; }
}

/* ==========================================
   DO GIA - HERITAGE LIST DESIGN v4.3
   ========================================== */

/* Khung trang danh sách */
.dg-subpage {
    color: #4b3023;
}

/* Ô tìm kiếm */
.dg-subpage input[type="search"],
.dg-subpage input[type="text"].form-control {
    background: #fff9ed;
    border: 1px solid #cbb58e;
    color: #513527;
    border-radius: 6px;
}

.dg-subpage input::placeholder {
    color: #947c65;
}

/* Nút tìm kiếm */
.dg-subpage button[type="submit"] {
    background: #8f1719;
    color: #fff5df;
    border: 1px solid #8f1719;
    border-radius: 6px;
}

.dg-subpage button[type="submit"]:hover {
    background: #701013;
    color: #fff;
}

/* Bảng danh sách */
.dg-subpage .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff9ec;
    border: 1px solid #d9c5a3;
    border-radius: 8px;
    overflow: hidden;
    color: #4b3023;
}

/* Tiêu đề bảng - đỏ son */
.dg-subpage .table thead th {
    background: #8b1719 !important;
    color: #fff1d6 !important;
    font-weight: 700;
    border-bottom: 2px solid #b68b51;
    padding: 14px 12px;
    white-space: nowrap;
}

/* Các dòng dữ liệu - màu giấy cổ */
.dg-subpage .table tbody td {
    background: #fff8e9;
    color: #4b3023;
    border-bottom: 1px solid #e7d9c2;
    padding: 13px 12px;
    vertical-align: middle;
}

.dg-subpage .table tbody tr:nth-child(even) td {
    background: #f5e9d3;
}

/* Hiệu ứng khi rê chuột */
.dg-subpage .table tbody tr:hover td {
    background: #efe0c1;
}

/* Liên kết trong bảng */
.dg-subpage .table tbody a {
    color: #8b1719;
    font-weight: 600;
}

/* Khung chứa bảng */
.dg-subpage .table-responsive {
    border-radius: 8px;
}

/* Mobile */
@media (max-width: 760px) {
    .dg-subpage .table thead th,
    .dg-subpage .table tbody td {
        padding: 10px 9px;
        font-size: 14px;
    }
}

/* ==========================================
   DO GIA - HERITAGE SEARCH BAR v4.4
   ========================================== */

/* Giới hạn chiều rộng khu vực tìm kiếm */
.dg-subpage form:has(input[name="q"]),
.dg-subpage form:has(input[name="search"]) {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 680px;
    margin: 0 0 24px;
}

/* Ô nhập từ khóa */
.dg-subpage form:has(input[name="q"]) input,
.dg-subpage form:has(input[name="search"]) input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    background: #fff9ed !important;
    color: #4b3023 !important;
    border: 1px solid #cbb58e !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font-size: 16px;
}

/* Nút tìm kiếm đỏ son */
.dg-subpage form:has(input[name="q"]) button,
.dg-subpage form:has(input[name="search"]) button {
    flex: 0 0 auto;
    min-width: 100px;
    height: 46px;
    padding: 0 20px;
    background: #8b1719 !important;
    color: #fff5df !important;
    border: 1px solid #8b1719 !important;
    border-radius: 7px !important;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.dg-subpage form:has(input[name="q"]) button:hover,
.dg-subpage form:has(input[name="search"]) button:hover {
    background: #681013 !important;
}

/* Trên điện thoại */
@media (max-width: 600px) {
    .dg-subpage form:has(input[name="q"]),
    .dg-subpage form:has(input[name="search"]) {
        max-width: 100%;
        gap: 8px;
    }

    .dg-subpage form:has(input[name="q"]) button,
    .dg-subpage form:has(input[name="search"]) button {
        min-width: 76px;
        padding: 0 12px;
    }
}

/* DO GIA - Khoang cach o tim kiem va nut Tim */
.dg-subpage form:has(input[name="q"]) button,
.dg-subpage form:has(input[name="search"]) button {
    margin-left: 12px !important;
}

@media (max-width: 600px) {
    .dg-subpage form:has(input[name="q"]) button,
    .dg-subpage form:has(input[name="search"]) button {
        margin-left: 8px !important;
    }
}

/* DO GIA - Khoang trong noi dung cac trang con */
.dg-main:has(> .dg-subpage) {
    min-height: 480px;
}

.dg-main > .dg-subpage {
    padding-bottom: 32px !important;
}

@media (max-width: 760px) {
    .dg-main:has(> .dg-subpage) {
        min-height: 360px;
    }
}
/* DO GIA v4.2 - Empty list message */
.dg-subpage .table tbody tr.dg-empty-row td {
    background: #fff8e9 !important;
    color: #795b42 !important;
    padding: 28px 16px !important;
    text-align: center;
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
    white-space: normal;
}
.dg-subpage .table tbody tr.dg-empty-row:hover td {
    background: #fff8e9 !important;
}

/* DO GIA - Person Form Heritage Layout */

.dg-person-form {
    background: rgba(255, 249, 237, 0.94);
    border: 1px solid #dcc6a4;
    border-radius: 10px;
}

.dg-form-section-title {
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: 700;
    color: #8b1719;
    padding-bottom: 10px;
    margin: 4px 0 20px;
    border-bottom: 1px solid #d8bc90;
}

.dg-person-form .form-label {
    color: #503528;
    font-weight: 600;
}

.dg-person-form .form-control,
.dg-person-form .form-select {
    background-color: #fffdf7;
    border: 1px solid #d5c09f;
    border-radius: 6px;
    min-height: 42px;
}

.dg-person-form .form-control:focus,
.dg-person-form .form-select:focus {
    border-color: #a34336;
    box-shadow: 0 0 0 3px rgba(139, 23, 25, 0.10);
}

.dg-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.dg-form-actions .btn-success {
    background: #8b1719;
    border-color: #8b1719;
    color: #fff5df;
}

.dg-form-actions .btn-light {
    background: #f5e7cf;
    border: 1px solid #c9aa7e;
    color: #593b2a;
}

@media (max-width: 760px) {
    .dg-person-form {
        padding: 18px !important;
    }

    .dg-form-section-title {
        font-size: 19px;
    }
}

/* DO GIA - Dashboard Heritage Alert */
.dg-subpage .alert-info {
    background: #fff1cf !important;
    border: 1px solid #d8b779 !important;
    color: #68451e !important;
    border-radius: 8px;
    padding: 16px 20px;
    line-height: 1.7;
}

/* DO GIA v4.3 - Mobile Hero Logo */
@media (max-width: 760px) {

    .dg-hero-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin: 20px 0 18px;
    }

    .dg-hero-brand .dg-hero-logo {
        display: block;
        width: 150px;
        height: 150px;
        max-width: 80%;
        object-fit: contain;
        flex-shrink: 0;
    }

    .dg-hero-brand h1 {
        font-size: clamp(48px, 12vw, 60px);
        line-height: 1.15;
        text-align: center;
        margin: 0;
    }

    .dg-hero-copy .dg-eyebrow,
    .dg-hero-copy > h2 {
        text-align: center;
    }
}