/* GLN – واجهة الأعضاء */
.gln-wrap, .gln-card, .gln-popup { font-family: inherit; box-sizing: border-box; }
.gln-wrap *, .gln-popup * { box-sizing: border-box; }

/* الشارة */
.gln-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; vertical-align: middle; }
.gln-badge--on  { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
.gln-badge--off { background: #f1f3f4; color: #5f6368; border: 1px solid #dadce0; }
.gln-badge .gln-g { width: 16px; height: 16px; flex: none; }
.gln-badge__mail { font-weight: 400; opacity: .8; font-size: 12px; }
.gln-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa0a6; flex: none; }

/* الأزرار */
.gln-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 1px solid #dadce0; border-radius: 10px; background: #fff; color: #1f1f1f; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; transition: box-shadow .15s, background .15s; }
.gln-btn:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60, 64, 67, .3); color: #1f1f1f; }
.gln-btn:focus-visible, .gln-popup button:focus-visible, .gln-link:focus-visible { outline: 3px solid #8ab4f8; outline-offset: 2px; }
.gln-btn[disabled] { opacity: .6; cursor: wait; }

/* بطاقة الحساب المربوط */
.gln-card { max-width: 440px; padding: 16px; border: 1px solid #dadce0; border-radius: 14px; background: #fff; color: #1f1f1f; }
.gln-card__id { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gln-card__id img, .gln-card__id .gln-g { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.gln-card__id > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gln-card__id strong { font-size: 15px; }
.gln-card__id span[dir] { font-size: 13px; color: #5f6368; overflow: hidden; text-overflow: ellipsis; }
.gln-switch { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eee; font-size: 14px; cursor: pointer; }
.gln-switch input { width: 18px; height: 18px; accent-color: #0b57d0; }
.gln-link { background: none; border: 0; padding: 4px 0; color: #b3261e; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* رسائل الحالة */
.gln-msg { min-height: 0; margin-top: 8px; font-size: 13px; line-height: 1.6; }
.gln-msg:empty { display: none; }
.gln-msg--ok   { color: #137333; }
.gln-msg--err  { color: #b3261e; }
.gln-msg--info { color: #5f6368; }

/* النافذة المنبثقة */
.gln-popup { position: fixed; inset: 0; z-index: 999999; display: flex; padding: 16px; background: var(--gln-overlay, rgba(0,0,0,.55)); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.gln-popup.is-open { opacity: 1; pointer-events: auto; }
.gln-pos-center { align-items: center; justify-content: center; }
.gln-pos-bottom { align-items: flex-end; justify-content: center; }
.gln-pos-top    { align-items: flex-start; justify-content: center; }

.gln-popup__card { position: relative; width: 100%; max-width: 400px; padding: 30px 26px 22px; text-align: center; background: var(--gln-bg, #fff); color: var(--gln-text, #1f1f1f); border-radius: var(--gln-radius, 20px); box-shadow: 0 18px 50px rgba(0, 0, 0, .28); transform: translateY(14px) scale(.98); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.gln-popup.is-open .gln-popup__card { transform: none; }
.gln-pos-bottom .gln-popup__card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; max-width: 520px; }

.gln-popup__icon { width: 64px; height: 64px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(127, 127, 127, .12); }
.gln-popup__icon img { width: 40px; height: 40px; object-fit: contain; }
.gln-popup__icon svg { width: 34px; height: 34px; }
.gln-popup h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; color: inherit; }
.gln-popup p { margin: 0 0 20px; font-size: 15px; line-height: 1.8; opacity: .85; color: inherit; }

.gln-popup__go { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--gln-btn, #0b57d0); color: var(--gln-btn-text, #fff); font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; }
.gln-popup__go:hover { filter: brightness(1.08); }
.gln-popup__go[disabled] { opacity: .6; cursor: wait; }
.gln-popup__later { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; background: none; color: inherit; opacity: .65; font-size: 14px; cursor: pointer; font-family: inherit; }
.gln-popup__later:hover { opacity: 1; }
.gln-popup__x { position: absolute; top: 10px; inset-inline-start: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(127, 127, 127, .12); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.gln-popup__x:hover { background: rgba(127, 127, 127, .25); }

@media (prefers-reduced-motion: reduce) {
  .gln-popup, .gln-popup__card, .gln-btn { transition: none; }
}
