/* Shared custom dialogs and notifications. */
.tf-dialog,.tf-toasts{font-family:Inter,Arial,sans-serif;color:#f2f2f5;font-size:14px;line-height:1.6}
.tf-dialog{box-sizing:border-box;width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #414149;border-radius:20px;background:linear-gradient(145deg,#25252b,#17171c);box-shadow:0 32px 100px #0009;overflow:auto;color-scheme:dark}
.tf-dialog::backdrop,#credentials-dialog::backdrop{background:#050509b8;backdrop-filter:blur(8px)}
.tf-dialog-form{padding:28px;margin:0}.tf-dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.tf-dialog-brand{font-size:10px;font-weight:700;letter-spacing:1.8px;color:#9696a6}
.tf-dialog button,.tf-toast button{font:inherit;cursor:pointer}.tf-dialog .tf-dialog-close,.tf-toast .tf-toast-close{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;padding:0;border:1px solid #44444e;border-radius:9px;background:#ffffff06;color:#aaaab7;font-size:22px;line-height:1}
.tf-dialog-emblem{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#ffffff0a;border:1px solid #50505d;color:#e1e1f1;font-size:25px;margin-bottom:20px}
.tf-dialog h2{font-size:24px;line-height:1.25;letter-spacing:-.7px;margin:0 0 12px;color:#fafafa}.tf-dialog p{font-size:13px;color:#aaaab8;margin:0 0 24px;overflow-wrap:anywhere}.tf-dialog label{display:block;font-size:12px;font-weight:600;margin:0 0 9px;color:#dddde5}
.tf-dialog .tf-dialog-input{box-sizing:border-box;width:100%;padding:13px 14px;background:#101014;border:1px solid #494954;border-radius:10px;color:#fff;font:inherit;outline:none}.tf-dialog .tf-dialog-input:focus{border-color:#c2c2d5;box-shadow:0 0 0 3px #ffffff0b}.tf-dialog-hint{display:block;text-align:right;font-size:11px;color:#9494a4;margin-top:8px;overflow-wrap:anywhere}
.tf-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:28px}.tf-dialog-actions button{padding:11px 18px;min-height:44px;border-radius:10px;font-size:12px;font-weight:600}.tf-dialog-cancel{background:#ffffff04;color:#cacad5;border:1px solid #42424e}.tf-dialog-submit{background:#eeeef4;color:#19191e;border:1px solid #eeeef4}.tf-danger .tf-dialog-emblem{color:#f8aaaa;background:#eb555514;border-color:#e9767640}.tf-danger .tf-dialog-submit{background:#dd5959;border-color:#dd5959;color:#fff}
.tf-dialog button:hover,.tf-toast button:hover{filter:brightness(1.15)}.tf-dialog button:focus-visible,.tf-toast button:focus-visible{outline:2px solid #ddd;outline-offset:3px}
.tf-toasts{position:fixed;inset:auto 24px 24px auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;max-height:calc(100dvh - 32px);z-index:10000;right:24px;bottom:24px;display:flex;flex-direction:column;gap:8px;width:min(360px,calc(100vw - 32px));pointer-events:none}
.tf-toast{--toast-accent:#93c5fd;--toast-border:#335681;--toast-bg:#17263c;display:flex;align-items:center;gap:9px;box-sizing:border-box;padding:9px 11px;border:1px solid var(--toast-border);border-left:3px solid var(--toast-accent);border-radius:10px;background:var(--toast-bg);box-shadow:0 6px 22px #0003;pointer-events:auto;animation:tf-enter .2s ease-out}
.tf-toast.tf-success{--toast-accent:#6ee7b7;--toast-border:#28634f;--toast-bg:#142e26}.tf-toast.tf-error{--toast-accent:#fda4af;--toast-border:#7d3948;--toast-bg:#361d26}
.tf-toasts::backdrop{background:transparent;pointer-events:none}
.tf-toast-icon{display:grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:7px;background:color-mix(in srgb,var(--toast-accent) 14%,transparent);color:var(--toast-accent);font-size:12px;font-weight:700;line-height:1}
.tf-toast-content{flex:1;min-width:0}.tf-toast-title{display:none}.tf-toast-message{display:block;font-size:12px;line-height:1.45;color:#f0f4fa;overflow-wrap:anywhere}.tf-toast .tf-toast-close{width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:var(--toast-accent);font-size:18px}

#credentials-dialog{box-sizing:border-box;width:min(500px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #414149;border-radius:20px;padding:28px;background:linear-gradient(145deg,#25252b,#17171c);color:#f2f2f5;box-shadow:0 32px 100px #0009}#credentials-dialog h2{font-size:24px}#credentials-dialog p{color:#aaaab8;font-size:13px;line-height:1.7}#credentials-dialog input{box-sizing:border-box;width:100%;background:#101014;color:#eee;border:1px solid #494954;border-radius:9px}#credentials-dialog button{margin-top:12px;width:100%;border-radius:10px;min-height:44px}
@keyframes tf-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:520px){.tf-dialog-form,#credentials-dialog{padding:22px}.tf-toasts{bottom:16px;right:16px}.tf-dialog-actions button{flex:1}}
@media(prefers-reduced-motion:reduce){.tf-toast{animation:none}}

.google-login-button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border:1px solid #55555f;border-radius:10px;background:#fafafa;color:#202026;text-decoration:none;font:600 13px Inter,Arial,sans-serif}.google-login-button span{font-size:20px;font-weight:800;color:#4285f4}.google-login-button:hover{background:#e6e6ee}.google-login-button:focus-visible{outline:2px solid #aaa;outline-offset:3px}.login-divider{text-align:center;color:#888894;font-size:11px;margin:20px 0}.dashboard-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px;min-width:0}.header-channel{display:flex;align-items:center;gap:10px;min-width:0}.header-channel>span{display:grid;place-items:center;width:38px;height:38px;flex-shrink:0;border:1px solid #4c4c58;border-radius:12px;background:#2a2a32;color:#eee;font-weight:700}.header-channel>div{min-width:0}.header-channel small{display:block;font-size:8px;letter-spacing:1.5px;color:#92929e}.header-channel strong{display:block;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#ededf4}.dashboard-header-actions #open-page{flex-shrink:0}@media(max-width:700px){.dashboard-top{flex-wrap:wrap;gap:16px}.dashboard-header-actions{width:100%;justify-content:space-between}.header-channel strong{max-width:150px}}

.header-channel>span{position:relative;overflow:hidden}.header-channel>span img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#2a2a32}

#header-channel-connect{display:block;color:#bcbcd0;font-size:10px;text-decoration:underline}#header-channel-connect[hidden],#header-channel-select[hidden]{display:none}#header-channel-select{width:180px;max-width:100%;font-size:11px;padding:5px;margin-top:4px}
