/* Account dropdown menu attached to the topbar user chip. */
.um { position: relative; }
.um-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: none; font: inherit; color: #374151; padding: 4px 6px; border-radius: 8px; }
.um-toggle:hover { background: #f3f4f6; }
.um-caret { width: 14px; height: 14px; color: #9ca3af; transition: transform .15s; }
.um.open .um-caret { transform: rotate(180deg); }

.um-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 264px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.14); padding: 8px; z-index: 1500; display: none; }
.um.open .um-panel { display: block; }
.um-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid #f1f5f9; margin-bottom: 6px; }
.um-av { width: 38px; height: 38px; border-radius: 50%; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; flex-shrink: 0; }
.um-name { font-weight: 600; color: #111827; font-size: .9rem; line-height: 1.2; }
.um-email { color: #6b7280; font-size: .78rem; word-break: break-all; }
.um-badge { display: inline-block; margin-top: 5px; font-size: .6rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; }
.um-badge.trial { background: #fffbeb; color: #92400e; }
.um-badge.active { background: #dcfce7; color: #166534; }
.um-badge.ended { background: #fef2f2; color: #991b1b; }

.um-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; font: inherit; color: #374151; font-size: .85rem; padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.um-item:hover { background: #f3f4f6; }
.um-item svg { width: 16px; height: 16px; color: #6b7280; flex-shrink: 0; }
.um-item.danger { color: #b91c1c; }
.um-item.danger svg { color: #b91c1c; }
.um-sep { height: 1px; background: #f1f5f9; margin: 6px 4px; }

/* Billing modal */
.um-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; display: none; align-items: center; justify-content: center; }
.um-modal.open { display: flex; }
.um-box { background: #fff; border-radius: 14px; width: min(460px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden; }
.um-box-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #eef2f7; }
.um-box-hd h3 { margin: 0; font-size: 1.05rem; color: #111827; }
.um-x { background: none; border: none; font-size: 1.5rem; line-height: 1; color: #9ca3af; cursor: pointer; }
.um-box-bd { padding: 10px 22px; }
.um-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f6f8fb; font-size: .88rem; }
.um-row:last-child { border-bottom: none; }
.um-row .k { color: #6b7280; }
.um-row .v { color: #111827; font-weight: 600; }
.um-actions { display: flex; flex-direction: column; gap: 9px; padding: 8px 22px 18px; }
.um-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 9px; padding: 11px 14px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.um-btn.primary { background: #2563eb; color: #fff; }
.um-btn.primary:hover { background: #1d4ed8; }
.um-btn:disabled { opacity: .6; cursor: default; }
.um-msg { font-size: .8rem; color: #6b7280; padding: 0 22px 16px; min-height: 1px; }
.um-msg.err { color: #b91c1c; }
