/* ══════════════════════════════════════════════════════
   THEME OVERRIDES — Light-only mode + Nav dropdown
   Loaded AFTER style.css to guarantee specificity
   ══════════════════════════════════════════════════════ */

/* ── Quill Rich Text Editor — CRM styling ── */
#compose-body-editor .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 6px 8px;
  background: #F8F8FA;
  border-radius: 6px 6px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}
#compose-body-editor .ql-container.ql-snow {
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 0.85rem;
  border-radius: 0 0 6px 6px;
}
#compose-body-editor .ql-editor {
  min-height: 120px;
  padding: 10px 12px;
  line-height: 1.55;
}
#compose-body-editor .ql-editor.ql-blank::before {
  color: rgba(60,60,67,0.35);
  font-style: normal;
}
#compose-body-editor .ql-toolbar.ql-snow .ql-formats {
  margin-right: 8px;
}
#compose-body-editor {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 10px;
}

/* ── NAV USER DROPDOWN — Apple-style popover ── */

#global-nav {
  position: relative !important;
  overflow: visible !important;
}
.gnav-right {
  position: absolute !important;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  align-items: center;
  gap: 8px;
  z-index: 100;
}

/* Hide the old inline links — JS replaces with dropdown */
.gnav-right > .pw-link,
.gnav-right > a[href="/auth/logout"],
.gnav-right > .user-name,
.gnav-right > .user-role {
  display: none !important;
}

.gnav-user-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: rgba(60,60,67,0.60);
  transition: background 0.2s;
}
.gnav-user-trigger:hover { background: rgba(120,120,128,0.08); }
.gnav-user-trigger .user-name { font-weight: 600; color: #000000; }
.gnav-user-trigger .chevron {
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s;
}
.gnav-user-trigger.open .chevron { transform: rotate(180deg); }

.gnav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--glass-shadow-elevated, 0 8px 32px rgba(0,0,0,0.12));
  z-index: 9999;
}
.gnav-dropdown.open { display: block; }

.gnav-dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 4px;
}
.gnav-dropdown-name { font-size: 14px; font-weight: 600; color: #000000; }
.gnav-dropdown-role {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 4px;
}

.gnav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.gnav-dropdown-item:hover {
  background: rgba(120,120,128,0.08);
}

.gnav-dropdown-item.logout {
  color: #FF3B30;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 4px;
  padding-top: 10px;
}
