/* Bounded V3 changes: Footer, Loader, Admin, profile and certificate only. */
.footer-v3 { font-family: Inter, Roboto, BeVietnam, Arial, sans-serif; padding: 44px 0 22px; }
.footer-v3 .footer-grid { gap: 30px; }
.footer-v3 .footer-grid h4 { font-size: 13px; font-weight: 650; line-height: 1.5; margin-bottom: 15px; }
.footer-v3 .footer-grid a:not(.brand) { font-size: 12px; line-height: 1.65; margin-bottom: 10px; color: #60758b; }
.footer-v3 .footer-grid a:hover { color: #173e68; text-decoration: underline; text-underline-offset: 3px; }
.footer-v3 .footer-grid p { font-size: 12px; line-height: 1.8; }
.footer-v3 .footer-bottom { font-size: 11px; gap: 16px; }
.footer-v3 .independent { font-size: 10px; display: inline-block; white-space: normal; }
#loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #fffffffa;
    font-family: Inter, Roboto, BeVietnam, sans-serif;
    color: #173e68;
    transition: opacity .28s, visibility .28s;
    animation: loader-failsafe .3s 2.7s forwards;
}
#loader .loader-emblem { width: 92px; height: 92px; display: grid; place-items: center; position: relative; }
#loader .loader-emblem img { width: 42px; height: 49px; position: relative; z-index: 1; animation: none; }
.loader-orbit { position: absolute; inset: 0; border: 3px solid #e8eef5; border-top-color: #183e66; border-right-color: #c4a265; border-radius: 50%; animation: loader-spin 1.05s linear infinite; }
#loader > span { font-size: 17px; font-weight: 750; letter-spacing: .4px; }
#loader > small { color: #7a8ca0; font-size: 11px; }
body.loaded #loader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.version-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; color: #526b84; background: #eef3f9; border: 1px solid #dce6f0; border-radius: 7px; padding: 5px 8px; white-space: nowrap; }
.admin-page-intro { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.admin-page-intro h2 { font-size: 24px; margin: 8px 0; }
.admin-page-intro p { font-size: 13px; color: #72869a; margin-bottom: 0; }
.admin-editor-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-editor-grid > *, .admin-editor-grid .card { min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.card-heading h2 { margin-bottom: 5px; }
.card-heading p { font-size: 12px; color: #6e8399; margin-bottom: 0; }
.admin-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-category-grid .checkbox { font-size: 12px; line-height: 1.5; min-height: 36px; align-items: center; margin: 0; }
.admin-image-preview { display: flex; justify-content: center; padding: 8px 0 20px; }
.admin-image-preview img { width: 88px; height: 88px; border-radius: 50%; border: 4px solid #ecf2f9; }
.admin-cover-preview { margin: 20px 0 15px; border-radius: 10px; overflow: hidden; }
.admin-cover-preview img { display: block; aspect-ratio: 3 / 1; width: 100%; height: auto; }
.admin-save-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.admin-save-bar > span { flex: 1; font-size: 13px; color: #7a8ca0; }
.admin-save-bar .form-message { flex-basis: 100%; margin: 0; }
.admin-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 18px; background: #fff; border: 1px solid #dde6ef; border-radius: 13px; margin-bottom: 20px; }
.admin-filter-bar label { font-size: 11px; font-weight: 600; color: #6a8096; display: block; margin-bottom: 6px; }
.admin-filter-bar input, .admin-filter-bar select { min-height: 42px; border: 1px solid #d5dfeb; border-radius: 8px; padding: 8px 11px; font-size: 13px; width: 100%; }
.admin-filter-bar .filter-query { flex: 1 1 220px; }
.admin-filter-bar .filter-choice { flex: 0 1 190px; }
.admin-filter-bar .filter-summary { flex-basis: 100%; font-size: 11px; color: #7890a4; margin: 0; }
.system-hero, .update-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.system-hero p, .update-hero p { font-size: 13px; color: #6b8297; margin-bottom: 0; }
.system-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.system-check { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid #e4ebf3; }
.system-check .badge { flex-shrink: 0; min-width: 68px; }
.system-check strong { display: block; font-size: 13px; line-height: 1.5; }
.system-check p { font-size: 12px; line-height: 1.7; color: #6c8195; margin: 5px 0 0; overflow-wrap: anywhere; }
.system-repairs { background: #edf7f2; border: 1px solid #cce7d9; border-radius: 10px; padding: 16px; margin-bottom: 18px; font-size: 12px; color: #287c5d; }
.system-repairs ul { margin-bottom: 0; }
.version-large { display: inline-block; background: #eaf1fa; color: #1f507c; border-radius: 8px; padding: 6px 10px; font-size: 20px; }
.update-steps { font-size: 13px; line-height: 1.8; padding-left: 20px; }
.update-steps li { margin-bottom: 10px; }
.maintenance-page { font-family: Inter, Roboto, BeVietnam, Arial, sans-serif; background: #f2f6fa; color: #173550; }
.maintenance-container { max-width: 1080px; margin: auto; padding: 28px; }
.maintenance-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 35px; }
.maintenance-container h1 { font-size: 28px; margin-bottom: 25px; }
.maintenance-container .brand { font-size: 20px; }
.maintenance-container .brand img { width: 38px; height: 44px; }
.gdv-profile-page { font-family: Inter, Roboto, BeVietnam, Arial, sans-serif; font-size: 14px; }
.gdv-profile-page .gdv-profile-layout { grid-template-columns: minmax(0, 1fr) minmax(275px, 335px); gap: 24px; align-items: start; }
.gdv-profile-page .gdv-profile-layout > * { min-width: 0; max-width: 100%; }
.gdv-profile-page .profile-panel, .gdv-profile-page .profile-aside .card { padding: 24px; border-radius: 16px; }
.gdv-profile-page .profile-aside { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.gdv-profile-page .identity-content { padding: 24px 30px; }
.gdv-profile-page .identity-person { min-width: 0; align-items: center; }
.gdv-profile-page .identity-person > div { min-width: 0; }
.gdv-profile-page .identity-person h1 { font-size: 28px; line-height: 1.4; overflow-wrap: anywhere; flex-wrap: wrap; margin-top: 0; }
.gdv-profile-page .identity-avatar { width: 106px; height: 106px; flex: 0 0 106px; margin-top: -68px; }
.gdv-profile-page .identity-top { align-items: center; }
.gdv-profile-page .identity-top > .badge { margin-top: 0; }
.gdv-profile-page .identity-stats { gap: 18px; }
.gdv-profile-page .identity-stats > div { min-width: 0; }
.gdv-profile-page .identity-stats span { font-size: 12px; line-height: 1.5; }
.gdv-profile-page .identity-stats strong { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.gdv-profile-page .identity-actions .btn { min-height: 44px; font-size: 13px; padding: 11px 15px; }
.gdv-profile-page .profile-panel h2, .gdv-profile-page .profile-aside h2 { font-size: 19px; line-height: 1.45; }
.gdv-profile-page .prose, .gdv-profile-page .prose p { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.gdv-profile-page .profile-information dd { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.gdv-profile-page .qr-box [data-qr] svg { width: 168px; max-width: 100%; }
.gdv-profile-page .qr-box p { font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; word-break: normal; }
.gdv-profile-page .rating-options { flex-wrap: wrap; gap: 8px; }
.gdv-profile-page .rating-choice { min-width: 40px; min-height: 38px; }
.gdv-profile-page .table-wrap { overflow-x: auto; max-width: 100%; }
.gdv-profile-page .profile-tab-list { flex-wrap: wrap; overflow: visible; gap: 6px; }
.gdv-profile-page .profile-tab-list button { min-width: 0; flex: 1 1 145px; font-size: 12px; white-space: normal; min-height: 44px; }
.gdv-profile-page .profile-information > div { grid-template-columns: 155px minmax(0, 1fr); }
.gdv-profile-page .profile-breadcrumb { font-size: 12px; overflow-wrap: anywhere; flex-wrap: wrap; }
.gdv-profile-page .bank-account-card { min-width: 0; }
.gdv-profile-page .bank-number { font-size: 18px; line-height: 1.5; }
.gdv-profile-page .mini-certificate { min-height: 175px; padding: 22px; }
.gdv-profile-page .mini-certificate strong { font-size: 13px; }
.gdv-profile-page .mini-certificate b { font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 1150px) {
    .admin-header-actions { gap: 10px; }
    .admin-account > span { display: none; }
    .admin-editor-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
    .admin-chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
    .admin-sidebar { width: 272px; transform: translateX(-100%); transition: transform .22s ease; padding: 22px 16px; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-body { width: 100%; margin-left: 0; }
    .admin-menu { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #dce5ee; border-radius: 9px; }
    .admin-top { padding: 13px 20px; gap: 12px; min-height: 80px; }
    .admin-content { padding: 24px 20px; }
    .admin-menu-open { overflow: hidden; }
}
@media (max-width: 850px) {
    .gdv-profile-page .gdv-profile-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .gdv-profile-page .profile-aside { width: 100%; display: flex; }
    .gdv-profile-page .profile-panel, .gdv-profile-page .profile-aside .card { width: 100%; padding: 22px; }
    .gdv-profile-page .identity-person h1 { font-size: 25px; }
    .gdv-profile-page .identity-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .admin-top { min-height: 75px; padding: 12px 14px; }
    .admin-top h1 { font-size: 18px; }
    .admin-title small { font-size: 8px; letter-spacing: 0; }
    .admin-header-actions { gap: 8px; }
    .admin-header-actions > .version-pill, .admin-health-shortcut { display: none; }
    .admin-account img { width: 34px; height: 34px; }
    .admin-content { padding: 20px 14px; }
    .admin-page .card { padding: 19px; }
    .admin-page .form-grid, .admin-editor-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .metric { padding: 17px; }
    .metric strong { font-size: 26px; }
    .metric-label { font-size: 11px; }
    .admin-page .toolbar, .admin-page-intro, .system-hero, .update-hero { align-items: flex-start; flex-direction: column; }
    .admin-page .toolbar h2 { font-size: 22px; }
    .admin-page .table-wrap table { min-width: 600px; }
    .admin-page table td, .admin-page table th { padding: 12px; }
    .admin-page .bank-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .admin-category-grid { gap: 9px; }
    .admin-category-grid .checkbox { font-size: 11px; }
    .admin-save-bar > span { flex-basis: 100%; }
    .admin-save-bar > .btn { width: 100%; }
    .admin-footer { flex-direction: column; align-items: flex-start; padding: 20px 15px; gap: 15px; }
    .admin-footer nav { gap: 12px; }
    .admin-filter-bar .filter-choice { flex: 1 1 145px; }
    .system-actions { width: 100%; }
    .system-actions .btn { flex: 1 1 160px; }
    .maintenance-container { padding: 20px 15px; }
    .maintenance-container h1 { font-size: 23px; }
    .maintenance-container .card { padding: 19px; }
    .gdv-profile-page .identity-content { padding: 20px; }
    .gdv-profile-page .identity-person { align-items: flex-start; flex-direction: column; gap: 14px; width: 100%; }
    .gdv-profile-page .identity-person h1 { font-size: 24px; letter-spacing: -.3px; }
    .gdv-profile-page .identity-top { align-items: flex-start; flex-direction: column; gap: 12px; }
    .gdv-profile-page .identity-avatar { width: 92px; height: 92px; flex-basis: 92px; margin-top: -65px; }
    .gdv-profile-page .identity-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .gdv-profile-page .identity-actions .btn { width: 100%; min-width: 0; justify-content: center; padding: 11px 8px; font-size: 12px; }
    .gdv-profile-page .identity-stats { gap: 16px; margin-top: 20px; padding-top: 20px; }
    .gdv-profile-page .identity-stats strong { font-size: 15px; }
    .gdv-profile-page .identity-stats span { font-size: 11px; }
    .gdv-profile-page .profile-panel, .gdv-profile-page .profile-aside .card { padding: 20px; }
    .gdv-profile-page .profile-information > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .gdv-profile-page .profile-tab-list button { flex-basis: 40%; font-size: 11px; padding: 10px 8px; }
    .gdv-profile-page .bank-account-card { padding: 15px; gap: 10px; }
    .gdv-profile-page .bank-symbol { width: 32px; height: 32px; font-size: 15px; }
    .gdv-profile-page .bank-number { font-size: 16px; }
    .gdv-profile-page .rating-summary { gap: 15px; flex-wrap: wrap; }
    .footer-v3 .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 18px; }
    .footer-v3 .footer-identity { grid-column: 1 / -1; }
    .footer-v3 .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 380px) {
    .admin-top h1 { font-size: 16px; }
    .admin-sidebar { width: min(272px, 86vw); }
    .metric-label .icon { display: none; }
    .gdv-profile-page .identity-person h1 { font-size: 22px; }
}
@media (min-width: 1025px) { .admin-veil { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .loader-orbit { animation: none; border-top-color: #bd9b5d; }
    #loader { transition: none; }
    .admin-sidebar { transition: none; }
}
/* Landscape certificate uses container units to retain the same proportions. */
.certificate-container { max-width: 1040px; }
.certificate-perspective { perspective: 1400px; padding: 6px 0 16px; }
.cert-landscape {
    container-type: inline-size;
    position: relative;
    width: 100%;
    max-width: 980px;
    min-height: 0;
    aspect-ratio: 16 / 9;
    padding: 0;
    margin: auto;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(130deg, #fff4cb, #d9ba74 61%, #f8e8b8);
    color: #5b4827;
    box-shadow: 0 20px 45px #23384d24, inset 0 0 0 1px #b0935a77;
    transform-style: preserve-3d;
    transition: transform .2s ease;
    font-family: Inter, Roboto, BeVietnam, Arial, sans-serif;
}
.cert-landscape.silver { background: linear-gradient(130deg, #f7fafc, #becbd8 61%, #edf3f8); color: #2d506e; }
.cert-landscape::before { content: ""; position: absolute; inset: 14px; border: 1px solid currentColor; opacity: .32; border-radius: 14px; pointer-events: none; }
.cert-landscape::after { content: ""; position: absolute; inset: 0; width: auto; height: auto; right: 0; top: 0; border: none; border-radius: 0; background: repeating-linear-gradient(45deg, transparent 0 13px, #5a472511 13px 14px, transparent 14px 27px); pointer-events: none; }
.cert-watermark { position: absolute; top: 54%; left: 4%; right: 4%; opacity: .055; font-size: 4.8cqw; font-weight: 800; white-space: nowrap; transform: rotate(-11deg); letter-spacing: 1px; pointer-events: none; }
.certificate-heading { position: absolute; left: 5%; right: 5%; top: 8%; text-align: center; padding-bottom: 4.2%; border-bottom: 1px solid #84683b55; z-index: 1; }
.certificate-heading > div { font-size: clamp(13px, 3.4cqw, 33px); font-weight: 750; line-height: 1.2; }
.cert-landscape .certificate-heading h2 { font-size: clamp(10px, 2.6cqw, 25px); line-height: 1.35; max-width: none; margin: 1.6% 0 0; letter-spacing: -.3px; color: inherit; }
.certificate-body { position: absolute; top: 34%; left: 5.5%; right: 21%; z-index: 1; }
.cert-landscape .certificate-person h3 { font-size: clamp(12px, 3.5cqw, 34px); line-height: 1.3; margin: 0 0 3%; overflow-wrap: anywhere; color: inherit; }
.certificate-person h3 span { color: #277d66; }
.cert-landscape .certificate-person p { font-size: clamp(8px, 1.95cqw, 19px); line-height: 1.5; color: inherit; margin: 0; max-width: 90%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.certificate-details { position: absolute; bottom: 9%; left: 5.5%; max-width: 69%; display: flex; flex-direction: column; gap: 1.4cqw; z-index: 1; }
.certificate-details span { font-size: clamp(7px, 1.55cqw, 15px); line-height: 1.3; overflow-wrap: anywhere; }
.certificate-details strong { font-size: clamp(9px, 1.9cqw, 19px); line-height: 1.4; font-weight: 650; }
.certificate-qr { position: absolute; bottom: 5%; right: 6%; width: 15%; text-align: center; z-index: 2; }
.certificate-qr [data-qr] { width: 100%; background: white; padding: 2%; border-radius: 8px; }
.certificate-qr svg { display: block; width: 100%; height: auto; }
.certificate-qr small { display: block; font-size: clamp(6px, 1.25cqw, 12px); line-height: 1.4; color: inherit; margin-top: 5%; }
.certificate-chip { display: none; }
.certificate-invalid { position: absolute; left: 5.5%; top: 64%; color: #ab3544; font-size: clamp(8px, 2cqw, 19px); font-weight: 700; z-index: 3; }
.certificate-export-note { margin: 15px 0 24px; font-size: 12px; color: #748ba0; }
.gdv-profile-page .identity-person { margin-top: 0; }
.gdv-profile-page .identity-person > div { padding-top: 0; }
.gdv-profile-page .enterprise-cover { height: 235px; }
body.loaded #loader { display: flex; }
@media (min-width: 1025px) {
    .admin-sidebar { width: 272px; }
    .admin-body { margin-left: 272px; width: calc(100% - 272px); }
}
@media (max-width: 700px) {
    .gdv-profile-page .enterprise-cover { height: 170px; }
    .gdv-profile-page .cover-label { font-size: 8px; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); letter-spacing: .3px; }
    .cert-landscape { border-radius: 13px; }
    .cert-landscape::before { inset: 7px; border-radius: 9px; }
    .certificate-perspective { padding-top: 0; }
    .certificate-page .page-intro h1 { font-size: 27px; }
    .certificate-container .actions { flex-wrap: wrap; }
    .certificate-export-note { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .cert-landscape { transition: none; transform: none !important; } }
.sidebar-close { display: none; }
@media (max-width: 1024px) {
    .sidebar-close { display: grid; place-items: center; position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border: 1px solid #dfe7ef; border-radius: 8px; background: #fff; color: #698196; font-size: 22px; }
    .admin-sidebar .brand { margin-right: 25px; }
}
