.brand-mark { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.brand-mark > span:last-child { display: grid; line-height: 1.05; }
.brand-mark strong { font-size: 19px; letter-spacing: -.03em; }
.brand-mark small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.brand-symbol { display: grid; width: 42px; height: 42px; place-items: center; color: var(--primary-contrast); background: linear-gradient(145deg, color-mix(in srgb,var(--primary) 78%,#fff), color-mix(in srgb,var(--primary) 84%,#000)); border-radius: 13px; box-shadow: 0 8px 20px color-mix(in srgb,var(--primary) 30%,transparent); font-weight: 800; }
.brand-mark.compact .brand-symbol { width: 38px; height: 38px; border-radius: 11px; }
.brand-mark.compact strong { font-size: 17px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 0; border-radius: var(--pw-radius); font-weight: 600; line-height: 1.2; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-primary { color: var(--primary-contrast); background: var(--primary); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 24%, transparent); }
.button-primary:hover { background: var(--primary-dark); }
.button-save { color: var(--pw-save-button-text); background: var(--pw-save-button-bg); font-size: var(--pw-save-button-font-size); }
.button-save:hover { color: var(--pw-save-button-text); background: color-mix(in srgb,var(--pw-save-button-bg) 86%,#000); }
.button-secondary { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 0; background: transparent; border-radius: 10px; }
.icon-button:hover { background: var(--surface-soft); }
.form-stack { display: grid; gap: 16px; }
.form-stack label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.form-options { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.check-label input { width: 16px; height: 16px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 60px; }
.password-field button { position: absolute; top: 7px; right: 7px; height: 34px; padding: 0 10px; border: 0; color: var(--primary); background: transparent; font-size: 12px; font-weight: 600; }
.notice { margin: 14px 0; padding: 12px 14px; border-radius: var(--pw-radius); font-size: var(--pw-notice-font, var(--pw-text-sm)); line-height: 1.5; }
.notice-error { color: #9e263b; background: #fff0f2; border: 1px solid #ffd4db; }
.notice-success { color: #086d52; background: #ecfbf6; border: 1px solid #bdeedc; }
.notice-info { color: var(--primary-dark); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); }
.requirements { display: grid; gap: 7px; margin: 20px 0; }
.requirement-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-soft); border-radius: 10px; font-size: 13px; }
.requirement-row small { color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.avatar { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; color: #fff; background: linear-gradient(145deg, #e98071, #ca5d72); border-radius: 12px; font-size: 13px; font-weight: 800; }
.avatar.small { width: 34px; height: 34px; border-radius: 10px; }

.form-grid.equal { grid-template-columns: 1fr 1fr; }
.database-fields { display: grid; gap: 12px; padding: 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 520px) { .form-grid.equal { grid-template-columns: 1fr; } }
.button-large { min-height: 52px; padding-inline: 22px; }
.form-stack fieldset { display: grid; gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; }
.form-stack legend { padding: 0 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.form-stack label small { color: var(--muted); font-size: 11px; font-weight: 500; }
.requirements-panel { margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; }
.requirements-panel summary { padding: 14px 16px; cursor: pointer; font-size: 13px; font-weight: 750; }
.requirements-panel .requirements { margin: 0; padding: 0 12px 12px; }

/* Shared vector icons and feedback */
.pw-icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; overflow: visible; }
.toast-region { position: fixed; z-index: 120; top: calc(var(--pw-header-height) + 14px); right: 18px; display: grid; width: min(430px, calc(100vw - 32px)); gap: 8px; pointer-events: none; }
.app-toast { display: grid; grid-template-columns: 24px minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 52px; padding: 9px 10px 9px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--success); border-radius: var(--pw-radius); box-shadow: 0 16px 45px rgba(15,23,42,.2); font-size: var(--pw-notice-font, var(--pw-text-sm)); line-height: 1.4; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; pointer-events: auto; }
.app-toast.toast-visible { opacity: 1; transform: translateY(0); }
.app-toast > .pw-icon { color: var(--success); font-size: 17px; }
.app-toast.error { border-left-color: var(--danger); }
.app-toast.error > .pw-icon { color: var(--danger); }
.app-toast button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 6px; }
.app-toast button:hover { color: var(--ink); background: var(--surface-soft); }
@media (max-width: 640px) { .toast-region { top: calc(var(--pw-header-height) + 8px); right: 10px; width: calc(100vw - 20px); } }

/* User-selectable notice presentation */
[data-notice-style="line"] .notice,
[data-notice-style="line"] .app-toast { background: var(--surface); box-shadow: none; }
[data-notice-style="soft"] .notice-info { background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
[data-notice-style="prominent"] .notice,
[data-notice-style="prominent"] .app-toast { border-width: 2px; box-shadow: 0 14px 36px rgba(15,23,42,.16); }
.button-with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
