.admin-wrap{max-width:1050px;margin:40px auto;padding:0 22px 70px}.admin-wrap h1{color:var(--navy);font-size:36px}.panel{border:1px solid var(--line);padding:30px;border-radius:14px;margin:22px 0;background:#fff}.panel h2{color:var(--navy)}label{display:block;font-size:14px;font-weight:700;margin:16px 0;color:var(--navy)}input:not([type=checkbox]),textarea,select{display:block;width:100%;padding:12px;border:1px solid #cddce5;border-radius:7px;margin-top:7px;background:white}input[type=checkbox]{margin-right:8px}.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.tabs{display:flex;gap:12px;margin-top:25px}.tabs button{border:1px solid #cbd9e3;border-radius:8px;background:white;padding:12px 20px}.tabs button.active{background:var(--navy);color:white}.logout{float:right;margin-top:-44px;background:none;border:0;color:var(--red)}.save-row{margin-top:28px}.service-edit{padding:12px 16px;margin:12px 0;background:#f5fafc;border-radius:9px}.service-edit button,.gallery-edit button{background:none;border:0;color:#c92130;font-weight:700}.gallery-edit{display:grid;grid-template-columns:100px 1fr auto;gap:15px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.gallery-edit img{width:100px;height:100px;object-fit:cover;border-radius:8px}.gallery-edit label{margin:5px 0}.gallery-edit input,.gallery-edit select{margin-top:3px}#notice:not(:empty){padding:12px 16px;border-radius:8px;background:#e9f8ff;color:var(--navy)}[hidden]{display:none!important}@media(max-width:650px){.two{grid-template-columns:1fr}.gallery-edit{grid-template-columns:75px 1fr}.gallery-edit img{width:75px;height:75px}.gallery-edit button{grid-column:2}}
.rich-edit-row{padding:14px 0;border-bottom:1px solid #ddd}.rich-edit-row>label{display:block;font-weight:600;margin-bottom:7px}.rich-toolbar{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:6px 0}.rich-toolbar button{border:1px solid #aaa;background:transparent;padding:5px 12px;border-radius:5px;cursor:pointer}.rich-toolbar label{display:flex;align-items:center;gap:6px}.rich-toolbar input{width:90px!important}.rich-area{min-height:55px;padding:10px;border:1px solid #aaa;border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere}.rich-area:focus{outline:2px solid #527cb6}

.tabs{display:flex;flex-wrap:wrap;gap:6px}.admin-page-panel>h2{margin-top:8px}.admin-page-panel .btn[type=submit]{margin-top:20px}#editors-content .text-page-editor{margin-top:20px}

/* Gallery and Contact already have tab headings; omit the redundant separator. */
#editors-gallery > .text-page-editor, #editors-contact > .text-page-editor { border-top: 0; padding-top: 0; }

/* Keep original dashboard branding hidden until saved settings are loaded. */
html.cps-admin-loading body { visibility: hidden; }
html.cps-admin-loading::after { content:""; position:fixed; top:50%; left:50%; width:34px; height:34px; margin:-17px 0 0 -17px; border:3px solid #dbe8ee; border-top-color:#193f59; border-radius:50%; animation:cps-admin-spin .8s linear infinite; z-index:9999; }
@keyframes cps-admin-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce){html.cps-admin-loading::after{animation:none}}

.rich-toolbar select{min-width:130px;max-width:220px;padding:6px 9px;border:1px solid #aab7c4;border-radius:6px;background:white;color:#263443}.rich-toolbar label{font-weight:500;font-size:13px}.rich-toolbar select:focus{outline:2px solid #527cb6;outline-offset:1px}

/* Version 6.8: persistent save control across all dashboard tabs. */
#dashboard{padding-bottom:92px}
.persistent-save:not([hidden]){position:fixed;bottom:0;left:0;right:0;z-index:90;background:rgba(255,255,255,.97);border-top:1px solid #d8e2e8;box-shadow:0 -5px 20px rgba(21,54,83,.08);display:flex;align-items:center;justify-content:flex-end;gap:18px;padding:12px max(24px,calc((100vw - 1000px)/2));}
.persistent-save-label{font-size:13px;font-weight:600;color:var(--navy)}
#content-form .admin-page-panel button[type="submit"],#save-gallery-text{display:none}
@media(max-width:650px){.persistent-save:not([hidden]){padding:10px 18px}.persistent-save .btn{padding:11px 18px}}
/* Match the brand-name editor's normal/bold weights with the public header. */
.rich-edit-row[data-brand-name="true"] .rich-area{font-family:Manrope,sans-serif;font-weight:500}
.rich-edit-row[data-brand-name="true"] .rich-area b,.rich-edit-row[data-brand-name="true"] .rich-area strong{font-weight:800}

/* v7.0: mirror public-site emphasis inside every dashboard rich-text editor. */
.rich-area.cps-rich-has-bold{font-weight:500}
.rich-area b,.rich-area strong,
.rich-edit-row[data-brand-name="true"] .rich-area b,
.rich-edit-row[data-brand-name="true"] .rich-area strong{font-weight:800}
.rich-area i,.rich-area em{font-style:italic}
.rich-area u{text-decoration:underline}

/* v7.1: Font selections are applied directly to editable text containers. */
[data-cps-edit] b,[data-cps-edit] strong,.rich-area b,.rich-area strong,.brand-name b,.brand-name strong{font-family:inherit}

.about-image-editor{padding:16px 0;border-top:1px solid #e4eaf0}.about-image-editor h3{margin:0 0 12px}

/* Keep save status visible when using the fixed save bar. */
#notice:not(:empty){position:fixed;bottom:74px;right:20px;z-index:100;max-width:min(480px,calc(100vw - 40px));background:#fff;border:1px solid #c9d8e2;box-shadow:0 6px 22px #0002;border-radius:8px;padding:12px 16px;color:#18334a}

/* Homepage and About Us image management */
.page-image-actions{display:grid;gap:10px;margin:8px 0 22px;padding:12px;border:1px solid #d7dfe7;border-radius:12px}
.page-image-preview{display:block;max-width:100%;width:320px;max-height:190px;object-fit:contain;border-radius:8px;background:#edf2f6}
.page-image-preview[hidden]{display:none}
.page-image-action-buttons{display:flex;gap:8px;flex-wrap:wrap}
.page-image-actions small{opacity:.8}

.page-image-editor{padding:18px;margin:18px 0;border:1px solid #d7dfe7;border-radius:12px;background:#f9fbfd}.page-image-editor h3{margin:0 0 12px;color:var(--navy)}
