/* Profile editor, scoped independently from account-management dialogs. */
.profile-editor-dialog{border:0;padding:0;border-radius:20px;width:min(650px,calc(100vw - 28px));max-height:calc(100dvh - 36px);overflow:auto;background:#f8f9fc;color:#263245;box-shadow:0 24px 80px #10182850}
.profile-editor-dialog::backdrop{background:#18243a83;backdrop-filter:blur(3px)}
.profile-editor-form{margin:0;display:block}
.profile-editor-header{display:flex;align-items:center;gap:14px;padding:22px 24px;background:#fff;border-bottom:1px solid #e9edf3}
.profile-editor-icon{width:45px;height:45px;flex:none;display:grid;place-items:center;border-radius:12px;background:#eef3ff;color:#3563c7;font-size:27px}
.profile-editor-header h2{font-size:23px;line-height:1.2;margin:0 0 5px;font-weight:750}
.profile-editor-header p{font-size:12px;color:#87919f;margin:0}
.profile-editor-close{margin-left:auto;width:35px;height:35px;display:grid;place-items:center;border:1px solid #e5eaf0;border-radius:9px;background:#fff;color:#718096;font-size:25px;cursor:pointer}
.profile-editor-body{padding:18px 24px 14px;display:grid;gap:14px}
.profile-editor-identity,.profile-editor-section{background:#fff;border:1px solid #e5e9ef;border-radius:15px}
.profile-editor-identity{display:flex;align-items:center;gap:13px;padding:15px}
.profile-editor-initials{width:44px;height:44px;flex:none;border-radius:12px;background:#eaf0ff;color:#3b63c6;display:grid;place-items:center;font-size:17px;font-weight:750}
.profile-editor-identity strong{display:block;font-size:16px;line-height:1.3}
.profile-editor-identity small{display:block;color:#87919e;font-size:12px;margin-top:3px}
.profile-editor-badge{margin-left:auto;background:#f4f6fa;color:#7b8899;padding:7px 9px;border-radius:8px;font-size:11px;white-space:nowrap}
.profile-editor-section{padding:18px}
.profile-editor-section h3{font-size:11px;letter-spacing:.09em;font-weight:750;color:#8a96a6;margin:0 0 15px}
.profile-field{display:block;font-size:12px;font-weight:650;color:#647183;margin:0 0 13px}
.profile-field:last-child{margin-bottom:0}
.profile-field span{display:block;margin-bottom:7px}
.profile-field input{width:100%;height:43px;box-sizing:border-box;margin:0;border:1px solid #e1e6ed;border-radius:9px;background:#fff;padding:9px 12px;color:#28364a;font-size:14px;outline:none}
.profile-field input:focus{border-color:#4773ee;box-shadow:0 0 0 3px #4773ee20}
.profile-field input.profile-readonly{background:#f5f7fa;color:#8490a0;cursor:not-allowed}
.profile-editor-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.profile-editor-error{color:#c3394a;font-size:12px;line-height:1.5;padding:0 24px;margin:0 0 10px}
.profile-editor-footer{display:flex;gap:10px;background:#fff;border-top:1px solid #e7eaf0;padding:15px 24px}
.profile-editor-footer button{height:43px;border-radius:9px;font-size:13px;cursor:pointer}
.profile-editor-cancel{padding:0 22px;border:1px solid #e4e8ef;background:#fff;color:#58687b}
.profile-editor-save{flex:1;border:0;background:#315ff4;color:#fff;font-weight:700}
.profile-editor-save:disabled{opacity:.65;cursor:wait}
.profile-editor-success{position:fixed;top:75px;right:18px;z-index:2147483000;background:#fff;border:1px solid #b6e3c9;border-left:4px solid #2cad71;border-radius:11px;padding:13px 18px;box-shadow:0 12px 35px #14243a29;color:#257f50;font-size:13px;font-weight:650}
@media(max-width:560px){.profile-editor-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:14px}.profile-editor-header{padding:16px}.profile-editor-header h2{font-size:19px}.profile-editor-body{padding:12px;gap:10px}.profile-editor-section{padding:14px}.profile-editor-columns{grid-template-columns:1fr;gap:0}.profile-editor-footer{padding:12px}.profile-editor-badge{display:none}}

/* Manage Site details modal follows the Edit Profile surfaces and spacing. */
.manage-site-settings-dialog{width:min(650px,calc(100vw - 28px));max-height:calc(100dvh - 30px);padding:0;overflow:hidden;border-radius:18px}
.manage-site-settings-dialog .dialog-heading{min-height:70px;padding:15px 20px;box-sizing:border-box}
.manage-site-settings-dialog .manage-site-close-icon{width:30px;height:30px;min-width:30px;padding:5px;border-radius:8px}
.manage-site-settings-dialog .manage-site-close-icon svg{width:15px;height:15px}
.manage-site-settings-body{max-height:min(64dvh,650px);overflow:auto;padding:14px 18px;display:grid;gap:10px}
.manage-site-identity{padding:11px 14px;border-radius:10px;background:var(--dialog-secondary);color:var(--dialog-secondary-text);font-size:12px;font-weight:700}
.manage-site-settings-body .site-settings-section{border:1px solid var(--dialog-border);border-radius:12px;overflow:hidden}
.manage-site-settings-body .site-settings-section>summary{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;cursor:pointer;list-style:none}
.manage-site-settings-body .site-settings-section>summary::-webkit-details-marker{display:none}
.manage-site-settings-body .site-settings-section>summary>span:nth-child(2){display:grid;gap:3px;flex:1}
.manage-site-settings-body .site-settings-section>summary strong{font-size:12px}
.manage-site-settings-body .site-settings-section>summary small{font-size:10px;color:var(--dialog-muted)}
.site-settings-summary-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:var(--dialog-secondary);color:var(--dialog-accent);font-size:16px}
.site-settings-chevron{color:var(--dialog-muted);font-size:16px;transform:rotate(0);transition:transform .15s}
.site-settings-section[open] .site-settings-chevron{transform:rotate(180deg)}
.manage-site-section-content{padding:12px;border-top:1px solid var(--dialog-border);display:grid;gap:12px}
.manage-site-settings-body .account-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.manage-site-settings-body label{display:grid;gap:5px;font-size:11px;font-weight:650}
.manage-site-settings-body label small{font-size:10px;color:var(--dialog-muted);font-weight:400}
.manage-site-settings-body input,.manage-site-settings-body textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--dialog-border);border-radius:8px;padding:9px 10px;font:inherit;font-size:12px;resize:vertical}
.manage-site-settings-body input[readonly],.manage-site-settings-body textarea[readonly]{opacity:.88}
.manage-site-section-content h3{font-size:11px;margin:2px 0 6px}
.manage-site-subsection{display:grid;gap:8px}
.manage-site-subsection+.manage-site-subsection{border-top:1px solid var(--dialog-border);padding-top:12px}
.manage-site-asset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.manage-site-asset-card{display:grid;gap:8px;align-content:start;padding:10px;border:1px solid var(--dialog-border);border-radius:10px;font-size:11px}
.manage-site-asset-preview{height:62px;display:grid;place-items:center;overflow:hidden;border-radius:8px;background:var(--dialog-secondary);font-size:10px}
.manage-site-asset-preview img{max-width:100%;max-height:100%;object-fit:contain}
.manage-site-app-icon{display:flex;align-items:center;gap:10px;font-size:11px}
.manage-site-app-icon .manage-site-asset-preview{width:60px;height:60px}
.manage-site-settings-footer{display:grid;grid-template-columns:auto minmax(140px,1fr);gap:8px 10px;align-items:center;padding:12px 18px}
.manage-site-save-note{grid-column:1/-1;font-size:10px;color:var(--dialog-muted)}
.manage-site-settings-footer .manage-site-cancel{min-width:74px;height:40px;padding:0 14px}
.manage-site-settings-footer .manage-site-save{height:42px;border:0;border-radius:9px;font-size:13px;font-weight:700}
.manage-site-settings-footer .manage-site-save:disabled{opacity:.9;cursor:not-allowed}
.pwa-settings-content{gap:12px}
.pwa-settings-intro{margin:0;color:var(--dialog-muted);font-size:11px;line-height:1.5}
.manage-site-subsection.pwa-app-card{gap:12px;padding:13px;border:1px solid var(--dialog-border);border-radius:13px;background:var(--dialog-surface,#fff)}
.pwa-app-heading{display:flex;align-items:center;gap:10px}
.pwa-app-heading-icon{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:11px;background:var(--dialog-secondary);color:var(--dialog-accent)}
.pwa-app-heading-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pwa-app-heading h3{margin:0;font-size:13px;line-height:1.3}
.pwa-app-heading small{display:block;margin-top:3px;color:var(--dialog-muted);font-size:10px}
.pwa-install-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid var(--dialog-border);border-radius:10px;background:var(--dialog-secondary);cursor:pointer}
.pwa-install-toggle>span:first-child{display:grid;gap:3px}
.pwa-install-toggle strong{font-size:11px}
.pwa-install-toggle small{color:var(--dialog-muted);font-size:10px;font-weight:400}
.pwa-switch{position:relative;display:inline-flex;flex:0 0 42px;width:42px;height:24px;align-items:center}
.pwa-switch input{position:absolute!important;inset:0!important;z-index:2!important;width:42px!important;height:24px!important;min-width:42px!important;min-height:24px!important;margin:0!important;padding:0!important;opacity:0!important;cursor:pointer!important}
.pwa-switch>span{position:absolute;inset:0;border:1px solid #bac3d0;border-radius:999px;background:#d8dee7;transition:background .18s ease,border-color .18s ease}
.pwa-switch>span:before{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #10182830;content:"";transition:transform .18s ease}
.pwa-switch input:checked+span{border-color:#355fce;background:#355fce}
.pwa-switch input:checked+span:before{transform:translateX(18px)}
.pwa-switch input:focus-visible+span{outline:3px solid #315cf533;outline-offset:3px}
.pwa-app-icon-editor{display:block!important}
.pwa-app-icon-editor .pwa-icon-card{grid-template-columns:66px minmax(0,1fr);align-items:center;gap:7px 12px;padding:10px;border-radius:11px}
.pwa-icon-card>strong{grid-column:1/-1;font-size:11px}
.pwa-icon-card .pwa-icon-preview{grid-column:1;grid-row:2/5;width:64px;height:64px;min-height:64px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--dialog-border);border-radius:15px;background:var(--dialog-secondary)}
.pwa-icon-preview img{width:100%;height:100%;max-height:none!important;object-fit:contain}
.pwa-icon-preview small{padding:4px;text-align:center;font-size:9px}
.pwa-icon-card .edit-url,.pwa-icon-card input[type=file]{grid-column:2;min-height:34px!important;padding:6px 8px!important;font-size:10px!important}
.pwa-icon-card .pwa-icon-note{grid-column:2;color:var(--dialog-muted);font-size:9px;line-height:1.35}
.pwa-icon-card .edit-remove{grid-column:2;justify-self:start;min-height:28px!important;padding:4px 9px;border-color:var(--dialog-border);color:var(--dialog-muted);font-size:10px}
.pwa-colors-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.pwa-color-field{display:flex!important;align-items:center;justify-content:space-between;gap:8px;padding:10px;border:1px solid var(--dialog-border);border-radius:10px;background:var(--dialog-secondary)}
.pwa-color-field>span:first-child{display:grid;gap:3px}
.pwa-color-field strong{font-size:10px}
.pwa-color-field small{color:var(--dialog-muted);font-size:9px;font-weight:400}
.pwa-color-picker{display:flex;align-items:center;gap:6px}
.pwa-color-picker input[type=color]{width:31px!important;min-width:31px!important;height:31px!important;min-height:31px!important;padding:3px!important;border:1px solid var(--dialog-border)!important;border-radius:8px!important;background:var(--dialog-surface,#fff)!important;cursor:pointer}
.pwa-color-picker output{min-width:55px;color:var(--dialog-muted);font:600 9px ui-monospace,SFMono-Regular,monospace}
.pwa-install-preview{overflow:hidden;border:1px solid var(--dialog-border);border-radius:10px;background:var(--pwa-preview-bg,#fff);color:#28364a}
.pwa-install-preview-bar{padding:7px 10px;background:var(--pwa-preview-theme,#315cf5);color:#fff;font-size:10px;font-weight:700}
.pwa-install-preview-screen{min-height:42px;display:flex;align-items:center;gap:8px;padding:8px 10px;font-size:10px;font-weight:650}
.pwa-install-preview-screen:before{width:22px;height:22px;border:1px solid #0001;border-radius:6px;background:var(--pwa-preview-theme,#315cf5);content:""}
body.dark .manage-site-subsection.pwa-app-card{background:#222832}
body.dark .pwa-switch>span{border-color:#687384;background:#444d5a}
body.dark .pwa-switch input:checked+span{border-color:#7895d5;background:#526fae}
body.dark .pwa-icon-card .edit-remove{background:transparent;color:#c2c9d3}
body.dark .pwa-color-picker input[type=color]{background:#303640!important}
body.dark .pwa-install-preview{color:#263245}
@media(max-width:560px){.manage-site-settings-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:14px}.manage-site-settings-dialog .dialog-heading{padding:12px}.manage-site-settings-body{max-height:calc(100dvh - 190px);padding:10px}.manage-site-settings-footer{padding:10px;grid-template-columns:72px minmax(0,1fr)}.manage-site-settings-body .account-fields-grid{grid-template-columns:1fr}.manage-site-asset-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.pwa-colors-grid{grid-template-columns:1fr}.manage-site-subsection.pwa-app-card{padding:10px}.pwa-icon-card .edit-url{font-size:9px!important}}
