.oauth-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #d9e2ef; border-radius: 10px; font-size: 13px; line-height: 1.65; min-width: 0; }
.oauth-panel p { margin: 0; }
.oauth-panel label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.oauth-panel input, .oauth-panel textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid #cbd5e1; background: #fff; color: #172033; border-radius: 7px; padding: 8px; font: inherit; }
.oauth-panel textarea { resize: vertical; overflow-wrap: anywhere; }
.oauth-panel input:focus, .oauth-panel textarea:focus { outline: 2px solid #a5c7ff; border-color: #2563eb; }
.oauth-button { display: inline-flex; justify-content: center; align-items: center; padding: 8px 12px; min-height: 36px; border: 1px solid transparent; border-radius: 7px; background: #0766ec; color: white; font: inherit; font-weight: 500; cursor: pointer; }
.oauth-button:hover { background: #0456cc; }
.oauth-button:disabled { opacity: .5; cursor: default; }
.oauth-secondary { background: transparent; color: inherit; border-color: #cbd5e1; }
.oauth-secondary:hover { background: #eaf1fa; color: #172033; }
.oauth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.oauth-return { display: flex; flex-direction: column; gap: 8px; }
.oauth-error { color: #bc2626; overflow-wrap: anywhere; }
.oauth-link { color: #075de0; text-decoration: underline; text-underline-offset: 3px; }
.oauth-success { padding: 10px; background: #edf9ef; color: #195f2a; border-radius: 8px; overflow-wrap: anywhere; }
.oauth-dialog { position: fixed; margin: auto; width: min(500px,calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d9e2ef; border-radius: 14px; background: white; color: #172033; box-shadow: 0 15px 65px #0003; font: 14px/1.6 system-ui,sans-serif; }
.oauth-dialog[open] { display: flex; flex-direction: column; }
.oauth-dialog::backdrop { background: #17203366; }
.oauth-dialog header, .oauth-dialog footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; flex-shrink: 0; }
.oauth-dialog h2 { font-size: 18px; margin: 0; font-weight: 600; }
.oauth-dialog footer { justify-content: flex-end; border-top: 1px solid #e5eaf1; }
.oauth-dialog-body { overflow: auto; min-height: 0; padding: 0 18px 16px; }
.oauth-dialog-body > p { margin: 0 0 12px; }
.oauth-close { padding: 2px 8px; font-size: 24px; line-height: 1; cursor: pointer; background: transparent; border: 0; }
[role="dialog"]:has(#add-account-form) { height: auto; max-height: calc(100dvh - 32px); width: min(500px,calc(100vw - 24px)); max-width: min(500px,calc(100vw - 24px)); }
#add-account-form { min-height: 0; }
#add-account-form > div:last-child { padding-top: 8px; flex-shrink: 0; }
@media (max-width: 767px) { [role="dialog"]:has(#add-account-form) { max-height: calc(100dvh - 16px); } .oauth-panel { padding: 10px; } .oauth-button { min-height: 40px; } }
aside:has(a[href="https://myaccount.google.com/apppasswords"]) { max-height: calc(100dvh - 64px); overflow-y: auto; }
